aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMatt McCutchen <matt@mattmccutchen.net>2008-10-10 21:56:15 -0400
committerShawn O. Pearce <spearce@spearce.org>2008-10-12 12:36:19 -0700
commitb75271d93a9e4be960d53fc4f955802530e0e733 (patch)
tree992479e9107dc2186498b675caf0ffda318a86b3 /t
parentf285a2d7ed6548666989406de8f0e7233eb84368 (diff)
downloadgit-b75271d93a9e4be960d53fc4f955802530e0e733.tar.gz
git-b75271d93a9e4be960d53fc4f955802530e0e733.tar.xz
"git diff <tree>{3,}": do not reverse order of arguments
According to the message of commit 0fe7c1de16f71312e6adac4b85bddf0d62a47168, "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 <matt@mattmccutchen.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 't')
-rwxr-xr-xt/t4013-diff-various.sh1
-rw-r--r--t/t4013/diff.diff_master_master^_side29
2 files changed, 30 insertions, 0 deletions
diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh
index 1a6b52234..fe6080da5 100755
--- a/t/t4013-diff-various.sh
+++ b/t/t4013-diff-various.sh
@@ -258,6 +258,7 @@ diff --patch-with-stat -r initial..side
diff --patch-with-raw -r initial..side
diff --name-status dir2 dir
diff --no-index --name-status dir2 dir
+diff master master^ side
EOF
test_done
diff --git a/t/t4013/diff.diff_master_master^_side b/t/t4013/diff.diff_master_master^_side
new file mode 100644
index 000000000..50ec9cadd
--- /dev/null
+++ b/t/t4013/diff.diff_master_master^_side
@@ -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
+$