Skip to content

Commit 42e731c

Browse files
committed
Merge branch 'jc/diff-tree-stale-comment'
Comment fix. * jc/diff-tree-stale-comment: diff-tree: update stale in-code comments
2 parents 3c548de + 8ba74bf commit 42e731c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

builtin/diff-tree.c

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

130130
/*
131-
* NOTE! We expect "a ^b" to be equal to "a..b", so we
132-
* reverse the order of the objects if the second one
133-
* is marked UNINTERESTING.
131+
* NOTE! We expect "a..b" to expand to "^a b" but it is
132+
* perfectly valid for revision range parser to yield "b ^a",
133+
* which means the same thing. If we get the latter, i.e. the
134+
* second one is marked UNINTERESTING, we recover the original
135+
* order the user gave, i.e. "a..b", by swapping the trees.
134136
*/
135137
nr_sha1 = opt->pending.nr;
136138
switch (nr_sha1) {

0 commit comments

Comments
 (0)