diff options
author | Carlo Marcelo Arenas Belón <carenas@gmail.com> | 2020-06-23 20:42:22 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-06-24 01:36:53 +0200 |
commit | c1ea625f72110fda87fd225d7dff002befb82d9f (patch) | |
tree | b3f7a3f5b3bfee8395931651796095df7111baeb /commit-reach.h | |
parent | commit-reach: use fast logic in repo_in_merge_base (diff) | |
download | git-c1ea625f72110fda87fd225d7dff002befb82d9f.tar.xz git-c1ea625f72110fda87fd225d7dff002befb82d9f.zip |
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 'commit-reach.h')
-rw-r--r-- | commit-reach.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/commit-reach.h b/commit-reach.h index 99a43e8b64..b49ad71a31 100644 --- a/commit-reach.h +++ b/commit-reach.h @@ -27,7 +27,9 @@ struct commit_list *repo_get_merge_bases_many_dirty(struct repository *r, struct commit_list *get_octopus_merge_bases(struct commit_list *in); -int is_descendant_of(struct commit *commit, struct commit_list *with_commit); +int repo_is_descendant_of(struct repository *r, + struct commit *commit, + struct commit_list *with_commit); int repo_in_merge_bases(struct repository *r, struct commit *commit, struct commit *reference); |