Signed-off-by: Stefan Beller <[email protected]>
---
 commit.c  | 4 ++--
 commit.h  | 3 ++-
 remote.c  | 2 +-
 shallow.c | 5 +++--
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/commit.c b/commit.c
index b74086d43d..98e04b949f 100644
--- a/commit.c
+++ b/commit.c
@@ -1049,7 +1049,7 @@ int is_descendant_of(struct commit *commit, struct 
commit_list *with_commit)
 /*
  * Is "commit" an ancestor of one of the "references"?
  */
-int in_merge_bases_many(struct commit *commit, int nr_reference, struct commit 
**reference)
+int in_merge_bases_many_the_repository(struct commit *commit, int 
nr_reference, struct commit **reference)
 {
        struct commit_list *bases;
        int ret = 0, i;
@@ -1074,7 +1074,7 @@ int in_merge_bases_many(struct commit *commit, int 
nr_reference, struct commit *
  */
 int in_merge_bases(struct commit *commit, struct commit *reference)
 {
-       return in_merge_bases_many(commit, 1, &reference);
+       return in_merge_bases_many(the_repository, commit, 1, &reference);
 }
 
 struct commit_list *reduce_heads(struct commit_list *heads)
diff --git a/commit.h b/commit.h
index 7bdc808018..ea2c5f528c 100644
--- a/commit.h
+++ b/commit.h
@@ -233,7 +233,8 @@ extern struct trace_key trace_shallow;
 
 int is_descendant_of(struct commit *, struct commit_list *);
 int in_merge_bases(struct commit *, struct commit *);
-int in_merge_bases_many(struct commit *, int, struct commit **);
+#define in_merge_bases_many(r, c, n, co) in_merge_bases_many_##r(c, n, co)
+int in_merge_bases_many_the_repository(struct commit *, int, struct commit **);
 
 extern int interactive_add(int argc, const char **argv, const char *prefix, 
int patch);
 extern int run_add_interactive(const char *revision, const char *patch_mode,
diff --git a/remote.c b/remote.c
index a4cf885012..0c253b82e8 100644
--- a/remote.c
+++ b/remote.c
@@ -1396,7 +1396,7 @@ static void add_missing_tags(struct ref *src, struct ref 
**dst, struct ref ***ds
                         * Is this tag, which they do not have, reachable from
                         * any of the commits we are sending?
                         */
-                       if (!in_merge_bases_many(commit, sent_tips.nr, 
sent_tips.tip))
+                       if (!in_merge_bases_many(the_repository, commit, 
sent_tips.nr, sent_tips.tip))
                                continue;
 
                        /* Add it in */
diff --git a/shallow.c b/shallow.c
index 64a4fcb57f..f43e94c8e8 100644
--- a/shallow.c
+++ b/shallow.c
@@ -720,7 +720,7 @@ static void post_assign_shallow(struct shallow_info *info,
                for (j = 0; j < bitmap_nr; j++)
                        if (bitmap[0][j] &&
                            /* Step 7, reachability test at commit level */
-                           !in_merge_bases_many(c, ca.nr, ca.commits)) {
+                           !in_merge_bases_many(the_repository, c, ca.nr, 
ca.commits)) {
                                update_refstatus(ref_status, info->ref->nr, 
*bitmap);
                                dst++;
                                break;
@@ -748,7 +748,8 @@ int delayed_reachability_test(struct shallow_info *si, int 
c)
                        si->nr_commits = ca.nr;
                }
 
-               si->reachable[c] = in_merge_bases_many(commit,
+               si->reachable[c] = in_merge_bases_many(the_repository,
+                                                      commit,
                                                       si->nr_commits,
                                                       si->commits);
                si->need_reachability_test[c] = 0;
-- 
2.15.1.433.g936d1b9894.dirty

Reply via email to