summaryrefslogtreecommitdiff
path: root/builtin/diff-tree.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-06-13 13:47:08 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-06-13 13:47:09 -0700
commit42e731c7826236d92557d8b1c64e4f38ee21a766 (patch)
tree96152b80e66ac165a9196043c9a060dccafd659b /builtin/diff-tree.c
parentMerge branch 'sb/submodule-blanket-recursive' (diff)
parentdiff-tree: update stale in-code comments (diff)
downloadtgif-42e731c7826236d92557d8b1c64e4f38ee21a766.tar.xz
Merge branch 'jc/diff-tree-stale-comment'
Comment fix. * jc/diff-tree-stale-comment: diff-tree: update stale in-code comments
Diffstat (limited to 'builtin/diff-tree.c')
-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 e401112045..492245f428 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) {