OSDN Git Service

diff-tree: update stale in-code comments
authorJunio C Hamano <gitster@pobox.com>
Fri, 2 Jun 2017 02:34:15 +0000 (11:34 +0900)
committerJunio C Hamano <gitster@pobox.com>
Fri, 2 Jun 2017 02:34:15 +0000 (11:34 +0900)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/diff-tree.c

index 12b683d..094e8de 100644 (file)
@@ -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.
         */
        nr_sha1 = opt->pending.nr;
        switch (nr_sha1) {