Skip to content

Commit b960cd3

Browse files
committed
Merge branch 'jc/diff-tree-stale-comment' into maint
Comment fix. * jc/diff-tree-stale-comment: diff-tree: update stale in-code comments
2 parents c4db75f + 8ba74bf commit b960cd3

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
@@ -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)