Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-05-24 09:28:56 +0400
committerJunio C Hamano <gitster@pobox.com>2008-05-24 11:01:56 +0400
commit3af828634fa5bdbca1b2061a81df8b3fa73b0d34 (patch)
treef4d4a50e8c1686b3ecd796a09f98cc6ca13bc907 /t/t5305-include-tag.sh
parent998b912927281a871e8d379e2b3a4385c775c4fe (diff)
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 <gitster@pobox.com>
Diffstat (limited to 't/t5305-include-tag.sh')
-rwxr-xr-xt/t5305-include-tag.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t5305-include-tag.sh b/t/t5305-include-tag.sh
index 0db27547ac..fb471a08c6 100755
--- a/t/t5305-include-tag.sh
+++ b/t/t5305-include-tag.sh
@@ -50,7 +50,7 @@ test_expect_success 'check unpacked result (have commit, no tag)' '
test_must_fail git cat-file -e $tag &&
git rev-list --objects $commit
) >list.actual &&
- git diff list.expect list.actual
+ test_cmp list.expect list.actual
'
rm -rf clone.git
@@ -78,7 +78,7 @@ test_expect_success 'check unpacked result (have commit, have tag)' '
export GIT_DIR &&
git rev-list --objects $tag
) >list.actual &&
- git diff list.expect list.actual
+ test_cmp list.expect list.actual
'
test_done