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>
maint
Daniel Barkalow17 years agocommitted byJunio C Hamano
@ -83,13 +83,13 @@ test_expect_success "checkout with unrelated dirty tree without -m" '
@@ -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 &&
git diff same kept
diff -u same kept
(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" '
@ -113,19 +113,19 @@ Auto-merged one
@@ -113,19 +113,19 @@ Auto-merged one
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 &&
diff expect.master current.master &&
diff -u expect.master current.master &&
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 &&
diff expect.index current.index
diff -u expect.index current.index
'
test_expect_success "checkout -m with dirty tree, renamed" '
@ -185,7 +185,7 @@ If you want to create a new branch from this checkout, you may do so
@@ -185,7 +185,7 @@ If you want to create a new branch from this checkout, you may do so