diff options
author | Taylor Blau <me@ttaylorr.com> | 2022-10-30 21:04:42 -0400 |
---|---|---|
committer | Taylor Blau <me@ttaylorr.com> | 2022-10-30 21:04:42 -0400 |
commit | 003f815dd9f42b1bb893338b32d9cce33a8926c1 (patch) | |
tree | 2d714cef7cf638a389124bfa75e526bed7697cb9 /commit.c | |
parent | e5be3c632af4ea1ec6d9406d30f7f8cf54f5e9e7 (diff) | |
parent | aa1df8146d70bb85c63b0999868fe29aebc1173e (diff) | |
download | git-003f815dd9f42b1bb893338b32d9cce33a8926c1.tar.gz |
Merge branch 'pw/rebase-keep-base-fixes'
"git rebase --keep-base" used to discard the commits that are
already cherry-picked to the upstream, even when "keep-base" meant
that the base, on top of which the history is being rebuilt, does
not yet include these cherry-picked commits. The --keep-base
option now implies --reapply-cherry-picks and --no-fork-point
options.
* 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); |