-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"git diff <tree>{3,}": do not reverse order of arguments
According to the message of commit 0fe7c1d, "git diff" with three or more trees expects the merged tree first followed by the parents, in order. However, this command reversed the order of its arguments, resulting in confusing diffs. A comment /* Again, the revs are all reverse */ suggested there was a reason for this, but I can't figure out the reason, so I removed the reversal of the arguments. Test case included. Signed-off-by: Matt McCutchen <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
- Loading branch information
1 parent
f285a2d
commit b75271d
Showing
3 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
$ git diff master master^ side | ||
diff --cc dir/sub | ||
index cead32e,7289e35..992913c | ||
--- a/dir/sub | ||
+++ b/dir/sub | ||
@@@ -1,6 -1,4 +1,8 @@@ | ||
A | ||
B | ||
+C | ||
+D | ||
+E | ||
+F | ||
+ 1 | ||
+ 2 | ||
diff --cc file0 | ||
index b414108,f4615da..10a8a9f | ||
--- a/file0 | ||
+++ b/file0 | ||
@@@ -1,6 -1,6 +1,9 @@@ | ||
1 | ||
2 | ||
3 | ||
+4 | ||
+5 | ||
+6 | ||
+ A | ||
+ B | ||
+ C | ||
$ |