summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-10-30 19:20:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-10-30 19:51:10 (GMT)
commit2ce406ccb85c4546b6d19309a6101b37c7bd952e (patch)
treeed00f07eab627dc4217ac76e38a652201f99aac2 /submodule.c
parentd76c9e95b435b660f8f1b3e01d3c2f934e2ec441 (diff)
downloadgit-2ce406ccb85c4546b6d19309a6101b37c7bd952e.zip
git-2ce406ccb85c4546b6d19309a6101b37c7bd952e.tar.gz
git-2ce406ccb85c4546b6d19309a6101b37c7bd952e.tar.bz2
get_merge_bases(): always clean-up object flags
The callers of get_merge_bases() can choose to leave object flags used during the merge-base traversal by passing cleanup=0 as a parameter, but in practice a very few callers can afford to do so (namely, "git merge-base"), as they need to compute merge base in preparation for other processing of their own and they need to see the object without contaminate flags. Change the function signature of get_merge_bases_many() and get_merge_bases() to drop the cleanup parameter, so that the majority of the callers do not have to say ", 1" at the end. Give a new get_merge_bases_many_dirty() API to support only a few callers that know they do not need to spend cycles cleaning up the object flags. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/submodule.c b/submodule.c
index b80ecac..10b2ddb 100644
--- a/submodule.c
+++ b/submodule.c
@@ -301,7 +301,7 @@ static int prepare_submodule_summary(struct rev_info *rev, const char *path,
left->object.flags |= SYMMETRIC_LEFT;
add_pending_object(rev, &left->object, path);
add_pending_object(rev, &right->object, path);
- merge_bases = get_merge_bases(left, right, 1);
+ merge_bases = get_merge_bases(left, right);
if (merge_bases) {
if (merge_bases->item == left)
*fast_forward = 1;