aboutsummaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-08 13:10:27 -0700
committerJunio C Hamano <gitster@pobox.com>2013-04-08 13:10:27 -0700
commit0290bf1250533442aa870d303e56745388d562c2 (patch)
tree7c0edf4d8f27084c1cb0b6d2511d0e6d95b370bf /revision.c
parent52a3e011c779456e63b6274af0024eeb92dd7888 (diff)
downloadgit-0290bf1250533442aa870d303e56745388d562c2.tar.gz
git-0290bf1250533442aa870d303e56745388d562c2.tar.xz
Revert 4b7f53da7618 (simplify-merges: drop merge from irrelevant side branch, 2013-01-17)
Kevin Bracey reports that the change regresses a case shown in the user manual. Trading one fix with another breakage is not worth it. Just keep the test to document the existing breakage, and revert the change for now. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/revision.c b/revision.c
index 71e62d831..eb9812886 100644
--- a/revision.c
+++ b/revision.c
@@ -1970,22 +1970,6 @@ static struct merge_simplify_state *locate_simplify_state(struct rev_info *revs,
return st;
}
-static void remove_treesame_parents(struct commit *commit)
-{
- struct commit_list **pp, *p;
-
- pp = &commit->parents;
- while ((p = *pp) != NULL) {
- struct commit *parent = p->item;
- if (parent->object.flags & TREESAME) {
- *pp = p->next;
- free(p);
- continue;
- }
- pp = &p->next;
- }
-}
-
static struct commit_list **simplify_one(struct rev_info *revs, struct commit *commit, struct commit_list **tail)
{
struct commit_list *p;
@@ -2039,17 +2023,10 @@ static struct commit_list **simplify_one(struct rev_info *revs, struct commit *c
break;
}
- if (revs->first_parent_only) {
+ if (revs->first_parent_only)
cnt = 1;
- } else {
- /*
- * A merge with a tree-same parent is useless
- */
- if (commit->parents && commit->parents->next)
- remove_treesame_parents(commit);
-
+ else
cnt = remove_duplicate_parents(commit);
- }
/*
* It is possible that we are a merge and one side branch