From 3af828634fa5bdbca1b2061a81df8b3fa73b0d34 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 23 May 2008 22:28:56 -0700 Subject: tests: do not use implicit "git diff --no-index" As a general principle, we should not use "git diff" to validate the results of what git command that is being tested has done. We would not know if we are testing the command in question, or locating a bug in the cute hack of "git diff --no-index". Rather use test_cmp for that purpose. Signed-off-by: Junio C Hamano --- t/t5505-remote.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 't/t5505-remote.sh') diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 48ff2d424d..a37b6f5213 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -135,7 +135,7 @@ test_expect_success 'show' ' git config --add remote.origin.push \ +refs/tags/lastbackup && git remote show origin > output && - git diff expect output) + test_cmp expect output) ' test_expect_success 'prune' ' @@ -179,7 +179,7 @@ test_expect_success 'update' ' git remote add apis ../mirror && git remote update && git branch -r > output && - git diff expect output) + test_cmp expect output) ' @@ -206,7 +206,7 @@ test_expect_success 'update with arguments' ' git config remotes.titanus manduca && git remote update phobaeticus titanus && git branch -r > output && - git diff expect output) + test_cmp expect output) ' @@ -229,7 +229,7 @@ test_expect_success 'update default' ' git config remote.drosophila.skipDefaultUpdate true && git remote update default && git branch -r > output && - git diff expect output) + test_cmp expect output) ' @@ -249,7 +249,7 @@ test_expect_success 'update default (overridden, with funny whitespace)' ' git config remotes.default "$(printf "\t drosophila \n")" && git remote update default && git branch -r > output && - git diff expect output) + test_cmp expect output) ' -- cgit v1.2.3