]> git.ipfire.org Git - thirdparty/git.git/commit - commit.c
merge-base --fork-point: extract libified function
authorPratik Karki <predatoramigo@gmail.com>
Tue, 4 Sep 2018 22:00:08 +0000 (15:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Oct 2018 05:12:45 +0000 (14:12 +0900)
commit103148aad80ee7ab65b902d77d964260cfd3f6ea
treea9de3895ad9c7d80e66997a263c737731bf96abb
parent3c3588c7d33456e76d0ed7b881378ee575f4dc45
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>
builtin/merge-base.c
commit.c
commit.h