diff-tree: update stale in-code comments
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Jun 2, 2017 at 11:34 UTC
8ba74bfd7c7e11454a15ed6360777e702c438846
1 file changed
+5
-3
builtin/diff-tree.c
+5
-3
@@ -127,9 +127,11 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
127
}
128
129
/*
130
- * NOTE! We expect "a ^b" to be equal to "a..b", so we
131
- * reverse the order of the objects if the second one
132
- * is marked UNINTERESTING.
130
+ * NOTE! We expect "a..b" to expand to "^a b" but it is
131
+ * perfectly valid for revision range parser to yield "b ^a",
132
+ * which means the same thing. If we get the latter, i.e. the
133
+ * second one is marked UNINTERESTING, we recover the original
134
+ * order the user gave, i.e. "a..b", by swapping the trees.
135
*/
136
nr_sha1 = opt->pending.nr;
137
switch (nr_sha1) {