Skip to content

Commit 8ba74bf

Browse files
committed
diff-tree: update stale in-code comments
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 4000b40 commit 8ba74bf

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

builtin/diff-tree.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,11 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
127127
}
128128

129129
/*
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.
133135
*/
134136
nr_sha1 = opt->pending.nr;
135137
switch (nr_sha1) {

0 commit comments

Comments
 (0)