Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-06-02 05:34:15 +0300
committerJunio C Hamano <gitster@pobox.com>2017-06-02 05:34:15 +0300
commit8ba74bfd7c7e11454a15ed6360777e702c438846 (patch)
tree8db20d3932f0d16ea38ad02165673196353d25ee /builtin/diff-tree.c
parent4000b4020911512eea10667dd5c97a0b4890e098 (diff)
diff-tree: update stale in-code comments
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 12b683d021..094e8de71f 100644
--- a/builtin/diff-tree.c
+++ b/builtin/diff-tree.c
@@ -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) {