Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
commit-reach.c: allow merge_bases_many to handle any repo
author
Stefan Beller
<sbeller@google.com>
Wed, 14 Nov 2018 00:12:52 +0000
(16:12 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 14 Nov 2018 08:22:40 +0000
(17:22 +0900)
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit-reach.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
c383830
)
diff --git
a/commit-reach.c
b/commit-reach.c
index 67c2e43d5e3cc20e988df000b814c690978a027c..a53b31e6a2a6439d7c6bc48aec0c57b8ce4d430d 100644
(file)
--- a/
commit-reach.c
+++ b/
commit-reach.c
@@
-95,7
+95,9
@@
static struct commit_list *paint_down_to_common(struct repository *r,
return result;
}
return result;
}
-static struct commit_list *merge_bases_many(struct commit *one, int n, struct commit **twos)
+static struct commit_list *merge_bases_many(struct repository *r,
+ struct commit *one, int n,
+ struct commit **twos)
{
struct commit_list *list = NULL;
struct commit_list *result = NULL;
{
struct commit_list *list = NULL;
struct commit_list *result = NULL;
@@
-110,14
+112,14
@@
static struct commit_list *merge_bases_many(struct commit *one, int n, struct co
return commit_list_insert(one, &result);
}
return commit_list_insert(one, &result);
}
- if (
parse_commit(
one))
+ if (
repo_parse_commit(r,
one))
return NULL;
for (i = 0; i < n; i++) {
return NULL;
for (i = 0; i < n; i++) {
- if (
parse_commit(
twos[i]))
+ if (
repo_parse_commit(r,
twos[i]))
return NULL;
}
return NULL;
}
- list = paint_down_to_common(
the_repository
, one, n, twos, 0);
+ list = paint_down_to_common(
r
, one, n, twos, 0);
while (list) {
struct commit *commit = pop_commit(&list);
while (list) {
struct commit *commit = pop_commit(&list);
@@
-224,7
+226,7
@@
static struct commit_list *get_merge_bases_many_0(struct commit *one,
struct commit_list *result;
int cnt, i;
struct commit_list *result;
int cnt, i;
- result = merge_bases_many(one, n, twos);
+ result = merge_bases_many(
the_repository,
one, n, twos);
for (i = 0; i < n; i++) {
if (one == twos[i])
return result;
for (i = 0; i < n; i++) {
if (one == twos[i])
return result;