aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-07-16 12:08:24 -0700
committerJunio C Hamano <gitster@pobox.com>2010-07-16 12:08:27 -0700
commit7a0e4d7c39083e951625e4c3434d05abfea8f5e6 (patch)
tree599abe83d2366065e34df86e7a0ce4f4ceecbfd8
parentc008c0ff2087da7b98adfa760247776619b32224 (diff)
downloadgit-7a0e4d7c39083e951625e4c3434d05abfea8f5e6.tar.gz
git-7a0e4d7c39083e951625e4c3434d05abfea8f5e6.tar.xz
diff A...B: do not limit the syntax too narrowly
Earlier we tried to make sure that the trees we get are what A...B syntax produced, by checking that earlier ones are all marked uninteresting (which has to be true as they are merge bases), there are two remaining ones that are interesting, and they are marked as non-symmetric-left and symmetric-left respectively. The "the last two must be interesting" condition is however wrong when one is an ancestor of the other between A and B (i.e. fast-forward). In such a case, one of them is marked uninteresting.
-rw-r--r--builtin-diff.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/builtin-diff.c b/builtin-diff.c
index 62b483bd5..192cbb212 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -407,19 +407,6 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
result = builtin_diff_tree(&rev, argc, argv, ent);
else if (ent[0].item->flags & UNINTERESTING) {
/*
- * Perhaps the user gave us A...B, which expands
- * to a list of negative merge bases followed by
- * A (symmetric-left) and B? Let's make sure...
- */
- for (i = 1; i < ents; i++)
- if (!(ent[i].item->flags & UNINTERESTING))
- break;
- if (ents != i + 2 ||
- (ent[i+1].item->flags & UNINTERESTING) ||
- (!(ent[i].item->flags & SYMMETRIC_LEFT)) ||
- (ent[i+1].item->flags & SYMMETRIC_LEFT))
- die("what do you mean by that?");
- /*
* diff A...B where there is at least one merge base
* between A and B. We have ent[0] == merge-base,
* ent[ents-2] == A, and ent[ents-1] == B. Show diff