diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-08-28 01:46:01 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-08-28 05:36:39 +0400 |
commit | a20efee9cfcf9c68bb01d0aa82ffc7903d88bab4 (patch) | |
tree | e329f429d9abd42f015099a072efedcfd385ec46 /builtin | |
parent | d0f1ea6003d97e63110fa7d50bb07f546a909b6e (diff) |
in_merge_bases(): support only one "other" commit
In early days of its life, I planned to make it possible to compute
"is a commit contained in all of these other commits?" with this
function, but it turned out that no caller needed it.
Just make it take two commit objects and add a comment to say what
these two functions do.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/branch.c | 4 | ||||
-rw-r--r-- | builtin/fetch.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/builtin/branch.c b/builtin/branch.c index d8cccf725d..98fa5d6284 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -122,7 +122,7 @@ static int branch_merged(int kind, const char *name, if (!reference_rev) reference_rev = head_rev; - merged = in_merge_bases(rev, &reference_rev, 1); + merged = in_merge_bases(rev, reference_rev); /* * After the safety valve is fully redefined to "check with @@ -132,7 +132,7 @@ static int branch_merged(int kind, const char *name, * a gentle reminder is in order. */ if ((head_rev != reference_rev) && - in_merge_bases(rev, &head_rev, 1) != merged) { + in_merge_bases(rev, head_rev) != merged) { if (merged) warning(_("deleting branch '%s' that has been merged to\n" " '%s', but not yet merged to HEAD."), diff --git a/builtin/fetch.c b/builtin/fetch.c index 8ec4eae3eb..97327e6cc6 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -314,7 +314,7 @@ static int update_local_ref(struct ref *ref, return r; } - if (in_merge_bases(current, &updated, 1)) { + if (in_merge_bases(current, updated)) { char quickref[83]; int r; strcpy(quickref, find_unique_abbrev(current->object.sha1, DEFAULT_ABBREV)); |