]> git.scripts.mit.edu Git - git.git/commitdiff
Merge branch 'jc/diff-merge-base-multi'
authorJunio C Hamano <gitster@pobox.com>
Fri, 16 Jul 2010 22:45:35 +0000 (15:45 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 Jul 2010 22:45:35 +0000 (15:45 -0700)
* jc/diff-merge-base-multi:
  diff A...B: do not limit the syntax too narrowly

1  2 
builtin/diff.c

diff --combined builtin/diff.c
index bb128631a919aa93bea31d7d6cb5e811427844f3,192cbb212ea00102c838fc6c8af8b9eda9d05750..89ae89cde1e6d8a0a2e02209f5396263a81bda5b
@@@ -218,8 -218,6 +218,8 @@@ static int builtin_diff_files(struct re
                        revs->max_count = 3;
                else if (!strcmp(argv[1], "-q"))
                        options |= DIFF_SILENT_ON_REMOVED;
 +              else if (!strcmp(argv[1], "-h"))
 +                      usage(builtin_diff_usage);
                else
                        return error("invalid option: %s", argv[1]);
                argv++; argc--;
@@@ -408,19 -406,6 +408,6 @@@ int cmd_diff(int argc, const char **arg
        else if (ents == 2)
                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,