aboutsummaryrefslogtreecommitdiffstats
path: root/commit.h
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2022-10-30 21:04:42 -0400
committerTaylor Blau <me@ttaylorr.com>2022-10-30 21:04:42 -0400
commit003f815dd9f42b1bb893338b32d9cce33a8926c1 (patch)
tree2d714cef7cf638a389124bfa75e526bed7697cb9 /commit.h
parentMerge branch 'jh/trace2-timers-and-counters' (diff)
parentrebase --keep-base: imply --no-fork-point (diff)
downloadgit-003f815dd9f42b1bb893338b32d9cce33a8926c1.tar.gz
git-003f815dd9f42b1bb893338b32d9cce33a8926c1.zip
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.h')
-rw-r--r--commit.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index 21e4d25ce7..fa39202fa6 100644
--- a/commit.h
+++ b/commit.h
@@ -64,6 +64,19 @@ enum decoration_type {
void add_name_decoration(enum decoration_type type, const char *name, struct object *obj);
const struct name_decoration *get_name_decoration(const struct object *obj);
+/*
+ * Look up commit named by "oid" respecting replacement objects.
+ * Returns NULL if "oid" is not a commit or does not exist.
+ */
+struct commit *lookup_commit_object(struct repository *r, const struct object_id *oid);
+
+/*
+ * Look up commit named by "oid" without replacement objects or
+ * checking for object existence. Returns the requested commit if it
+ * is found in the object cache, NULL if "oid" is in the object cache
+ * but is not a commit and a newly allocated unparsed commit object if
+ * "oid" is not in the object cache.
+ */
struct commit *lookup_commit(struct repository *r, const struct object_id *oid);
struct commit *lookup_commit_reference(struct repository *r,
const struct object_id *oid);