summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorPratik Karki <predatoramigo@gmail.com>2018-09-04 22:00:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-11 05:12:45 (GMT)
commit103148aad80ee7ab65b902d77d964260cfd3f6ea (patch)
treea9de3895ad9c7d80e66997a263c737731bf96abb /commit.h
parent3c3588c7d33456e76d0ed7b881378ee575f4dc45 (diff)
downloadgit-103148aad80ee7ab65b902d77d964260cfd3f6ea.zip
git-103148aad80ee7ab65b902d77d964260cfd3f6ea.tar.gz
git-103148aad80ee7ab65b902d77d964260cfd3f6ea.tar.bz2
merge-base --fork-point: extract libified function
We need this functionality in the builtin rebase. Note: to make this function truly reusable, we have to switch the call get_merges_many_dirty() to get_merges_many() because we want the commit flags to be reset (otherwise, subsequent get_merge_bases() calls would obtain incorrect results). This did not matter when the function was called in `git rev-parse --fork-point` because in that command, the process definitely did not traverse any commits before exiting. Signed-off-by: Pratik Karki <predatoramigo@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index da0db36..b342400 100644
--- a/commit.h
+++ b/commit.h
@@ -211,6 +211,8 @@ extern struct commit_list *get_octopus_merge_bases(struct commit_list *in);
/* To be used only when object flags after this call no longer matter */
extern struct commit_list *get_merge_bases_many_dirty(struct commit *one, int n, struct commit **twos);
+struct commit *get_fork_point(const char *refname, struct commit *commit);
+
/* largest positive number a signed 32-bit integer can contain */
#define INFINITE_DEPTH 0x7fffffff