commit-reach: avoid is_descendant_of() shim
d91d6fbf26
(commit-reach: create repo_is_descendant_of(), 2020-06-17)
adds a repository aware version of is_descendant_of() and a backward
compatibility shim that is barely used.
Update all callers to directly use the new repo_is_descendant_of()
function instead; making the codebase simpler and pushing more
the_repository references higher up the stack.
Helped-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
80b8ada547
commit
c1ea625f72
@ -1025,7 +1025,8 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
|
||||
commit_list_insert(head, &list);
|
||||
merge_head = lookup_commit_reference(the_repository,
|
||||
&merge_heads.oid[0]);
|
||||
if (is_descendant_of(merge_head, list)) {
|
||||
if (repo_is_descendant_of(the_repository,
|
||||
merge_head, list)) {
|
||||
/* we can fast-forward this without invoking rebase */
|
||||
opt_ff = "--ff-only";
|
||||
ran_ff = 1;
|
||||
|
Reference in New Issue
Block a user