summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-06-24 15:29:31 -0700
committerJunio C Hamano <gitster@pobox.com>2017-06-24 15:29:31 -0700
commitb960cd37c6ec11b35802216c38c9d02886f4fce8 (patch)
treec64fed8256eb258b9f993f3fd8a8dd1cd2d672a0
parentc4db75f275327a9e0fe0b62096a6a7e5220bb041 (diff)
parent8ba74bfd7c7e11454a15ed6360777e702c438846 (diff)
downloadgit-b960cd37c6ec11b35802216c38c9d02886f4fce8.tar.gz
Merge branch 'jc/diff-tree-stale-comment' into maint
Comment fix. * jc/diff-tree-stale-comment: diff-tree: update stale in-code comments
-rw-r--r--builtin/diff-tree.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c
index 326f88b657..a570fea55b 100644
--- a/builtin/diff-tree.c
+++ b/builtin/diff-tree.c
@@ -128,9 +128,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.
*/
nr_sha1 = opt->pending.nr;
switch (nr_sha1) {