Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2022-10-31 04:04:42 +0300
committerTaylor Blau <me@ttaylorr.com>2022-10-31 04:04:42 +0300
commit003f815dd9f42b1bb893338b32d9cce33a8926c1 (patch)
tree2d714cef7cf638a389124bfa75e526bed7697cb9 /commit.c
parente5be3c632af4ea1ec6d9406d30f7f8cf54f5e9e7 (diff)
parentaa1df8146d70bb85c63b0999868fe29aebc1173e (diff)
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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/commit.c b/commit.c
index 89b8efc611..572301b80a 100644
--- a/commit.c
+++ b/commit.c
@@ -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);