diff options
Diffstat (limited to 'builtin/diff-tree.c')
-rw-r--r-- | builtin/diff-tree.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c index 8b26a66a95..1fd06eac4b 100644 --- a/builtin/diff-tree.c +++ b/builtin/diff-tree.c @@ -104,9 +104,9 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix) struct setup_revision_opt s_r_opt; int read_stdin = 0; + git_config(git_diff_basic_config, NULL); /* no "diff" UI options */ init_revisions(opt, prefix); gitmodules_config(); - git_config(git_diff_basic_config, NULL); /* no "diff" UI options */ opt->abbrev = 0; opt->diff = 1; opt->disable_stdin = 1; @@ -127,9 +127,11 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix) } /* - * NOTE! We expect "a ^b" to be equal to "a..b", so we - * reverse the order of the objects if the second one - * is marked UNINTERESTING. + * NOTE! We expect "a..b" to expand to "^a b" but it is + * perfectly valid for revision range parser to yield "b ^a", + * which means the same thing. If we get the latter, i.e. the + * second one is marked UNINTERESTING, we recover the original + * order the user gave, i.e. "a..b", by swapping the trees. */ switch (opt->pending.nr) { case 0: |