diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-10-17 12:54:27 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-10-17 12:54:27 -0700 |
| commit | a524c627a424171c9cc2be2258725adc3f0bcc5a (patch) | |
| tree | 9699e6c34eb24a9b2d9981c303b4b8e2a89ba489 /commit.c | |
| parent | Merge a handful of topics from the 'master' front (diff) | |
| parent | rebase --keep-base: imply --no-fork-point (diff) | |
| download | git-a524c627a424171c9cc2be2258725adc3f0bcc5a.tar.gz git-a524c627a424171c9cc2be2258725adc3f0bcc5a.zip | |
Merge branch 'pw/rebase-keep-base-fixes' into pw/rebase-reflog-fixes
* pw/rebase-keep-base-fixes:
rebase --keep-base: imply --no-fork-point
rebase --keep-base: imply --reapply-cherry-picks
rebase: factor out branch_base calculation
rebase: rename merge_base to branch_base
rebase: store orig_head as a commit
rebase: be stricter when reading state files containing oids
t3416: set $EDITOR in subshell
t3416: tighten two tests
Diffstat (limited to 'commit.c')
| -rw-r--r-- | commit.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -59,6 +59,14 @@ struct commit *lookup_commit_or_die(const struct object_id *oid, const char *ref return c; } +struct commit *lookup_commit_object(struct repository *r, + const struct object_id *oid) +{ + struct object *obj = parse_object(r, oid); + return obj ? object_as_type(obj, OBJ_COMMIT, 0) : NULL; + +} + struct commit *lookup_commit(struct repository *r, const struct object_id *oid) { struct object *obj = lookup_object(r, oid); |
