Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Use diff -u instead of diff in t7201
author
Daniel Barkalow
<barkalow@iabervon.org>
Thu, 7 Feb 2008 16:40:11 +0000
(11:40 -0500)
committer
Junio C Hamano
<gitster@pobox.com>
Sun, 10 Feb 2008 07:16:51 +0000
(23:16 -0800)
If the test failed, it was giving really unclear ed script
output. Instead, give a diff that sort of suggests the problem. Also
replaces the use of "git diff" for this purpose with "diff -u".
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
t/t7201-co.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
e496c00
)
diff --git
a/t/t7201-co.sh
b/t/t7201-co.sh
index 73d8a00e2cca907e562c50c70a10c02e3c0e02ca..3d8e01c030101711143da29351e5651bd09a4a02 100755
(executable)
--- a/
t/t7201-co.sh
+++ b/
t/t7201-co.sh
@@
-83,13
+83,13
@@
test_expect_success "checkout with unrelated dirty tree without -m" '
fill 0 1 2 3 4 5 6 7 8 >same &&
cp same kept
git checkout side >messages &&
fill 0 1 2 3 4 5 6 7 8 >same &&
cp same kept
git checkout side >messages &&
-
git diff
same kept
+
diff -u
same kept
(cat > messages.expect <<EOF
M same
EOF
) &&
touch messages.expect &&
(cat > messages.expect <<EOF
M same
EOF
) &&
touch messages.expect &&
-
git diff
messages.expect messages
+
diff -u
messages.expect messages
'
test_expect_success "checkout -m with dirty tree" '
'
test_expect_success "checkout -m with dirty tree" '
@@
-113,19
+113,19
@@
Auto-merged one
M one
EOF
) &&
M one
EOF
) &&
-
git diff
expect.messages messages &&
+
diff -u
expect.messages messages &&
fill "M one" "A three" "D two" >expect.master &&
git diff --name-status master >current.master &&
fill "M one" "A three" "D two" >expect.master &&
git diff --name-status master >current.master &&
- diff expect.master current.master &&
+ diff
-u
expect.master current.master &&
fill "M one" >expect.side &&
git diff --name-status side >current.side &&
fill "M one" >expect.side &&
git diff --name-status side >current.side &&
- diff expect.side current.side &&
+ diff
-u
expect.side current.side &&
: >expect.index &&
git diff --cached >current.index &&
: >expect.index &&
git diff --cached >current.index &&
- diff expect.index current.index
+ diff
-u
expect.index current.index
'
test_expect_success "checkout -m with dirty tree, renamed" '
'
test_expect_success "checkout -m with dirty tree, renamed" '
@@
-143,7
+143,7
@@
test_expect_success "checkout -m with dirty tree, renamed" '
git checkout -m renamer &&
fill 1 3 4 5 7 8 >expect &&
git checkout -m renamer &&
fill 1 3 4 5 7 8 >expect &&
- diff expect uno &&
+ diff
-u
expect uno &&
! test -f one &&
git diff --cached >current &&
! test -s current
! test -f one &&
git diff --cached >current &&
! test -s current
@@
-168,7
+168,7
@@
test_expect_success 'checkout -m with merge conflict' '
git diff master:one :3:uno |
sed -e "1,/^@@/d" -e "/^ /d" -e "s/^-/d/" -e "s/^+/a/" >current &&
fill d2 aT d7 aS >expect &&
git diff master:one :3:uno |
sed -e "1,/^@@/d" -e "/^ /d" -e "s/^-/d/" -e "s/^+/a/" >current &&
fill d2 aT d7 aS >expect &&
- diff current expect &&
+ diff
-u
current expect &&
git diff --cached two >current &&
! test -s current
'
git diff --cached two >current &&
! test -s current
'
@@
-185,7
+185,7
@@
If you want to create a new branch from this checkout, you may do so
HEAD is now at 7329388... Initial A one, A two
EOF
) &&
HEAD is now at 7329388... Initial A one, A two
EOF
) &&
-
git diff
messages.expect messages &&
+
diff -u
messages.expect messages &&
H=$(git rev-parse --verify HEAD) &&
M=$(git show-ref -s --verify refs/heads/master) &&
test "z$H" = "z$M" &&
H=$(git rev-parse --verify HEAD) &&
M=$(git show-ref -s --verify refs/heads/master) &&
test "z$H" = "z$M" &&