Web lists-archives.com

[PATCH 190/194] commit: allow in_merge_bases to handle arbitrary repositories




Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx>
---
 commit.c | 4 ++--
 commit.h | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/commit.c b/commit.c
index a14933b208..cdee8d3917 100644
--- a/commit.c
+++ b/commit.c
@@ -1072,9 +1072,9 @@ int in_merge_bases_many(struct repository *r, struct commit *commit, int nr_refe
 /*
  * Is "commit" an ancestor of (i.e. reachable from) the "reference"?
  */
-int in_merge_bases_the_repository(struct commit *commit, struct commit *reference)
+int in_merge_bases(struct repository *r, struct commit *commit, struct commit *reference)
 {
-	return in_merge_bases_many(the_repository, commit, 1, &reference);
+	return in_merge_bases_many(r, commit, 1, &reference);
 }
 
 struct commit_list *reduce_heads(struct commit_list *heads)
diff --git a/commit.h b/commit.h
index 36412a5a9e..2281948738 100644
--- a/commit.h
+++ b/commit.h
@@ -232,8 +232,7 @@ extern void prune_shallow(int show_only);
 extern struct trace_key trace_shallow;
 
 int is_descendant_of(struct commit *, struct commit_list *);
-#define in_merge_bases(r, c1, c2) in_merge_bases_##r(c1, c2)
-int in_merge_bases_the_repository(struct commit *, struct commit *);
+int in_merge_bases(struct repository *r, struct commit *, struct commit *);
 int in_merge_bases_many(struct repository *r, struct commit *, int, struct commit **);
 
 extern int interactive_add(int argc, const char **argv, const char *prefix, int patch);
-- 
2.15.1.433.g936d1b9894.dirty