diff options
author | Carlo Marcelo Arenas Belón <carenas@gmail.com> | 2020-06-23 18:42:22 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-06-23 23:36:53 (GMT) |
commit | c1ea625f72110fda87fd225d7dff002befb82d9f (patch) | |
tree | b3f7a3f5b3bfee8395931651796095df7111baeb /builtin/pull.c | |
parent | 80b8ada54756e972b01d20b98a388fbbc3a2fe58 (diff) | |
download | git-c1ea625f72110fda87fd225d7dff002befb82d9f.zip git-c1ea625f72110fda87fd225d7dff002befb82d9f.tar.gz git-c1ea625f72110fda87fd225d7dff002befb82d9f.tar.bz2 |
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>
Diffstat (limited to 'builtin/pull.c')
-rw-r--r-- | builtin/pull.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/pull.c b/builtin/pull.c index 00e5857..fe5f335 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -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; |