summaryrefslogtreecommitdiff
path: root/t/t5000-tar-tree.sh
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2013-05-20 09:58:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-05-20 22:31:45 (GMT)
commit0a00ee58446e3a74e480057059a877da9c857346 (patch)
tree4171b5f84b70a4183bc424f0608c151ce49164be /t/t5000-tar-tree.sh
parent03d9bc564b3e87a2cdf4d511c8707a2de54ee6c6 (diff)
downloadgit-0a00ee58446e3a74e480057059a877da9c857346.zip
git-0a00ee58446e3a74e480057059a877da9c857346.tar.gz
git-0a00ee58446e3a74e480057059a877da9c857346.tar.bz2
t5000: simplify tar-tree tests
Just compare the archives created by git tar-tree with the ones created using git archive with the equivalent options, whose contents are checked already, instead of extracting them again. Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5000-tar-tree.sh')
-rwxr-xr-xt/t5000-tar-tree.sh31
1 files changed, 8 insertions, 23 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index 5a9b570..a1f35d2 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -115,14 +115,6 @@ test_expect_success 'git-archive --prefix=olde-' '
check_tar with_olde-prefix olde-
-test_expect_success \
- 'git tar-tree' \
- 'git tar-tree HEAD >b2.tar'
-
-test_expect_success \
- 'git archive vs. git tar-tree' \
- 'test_cmp b.tar b2.tar'
-
test_expect_success 'git archive on large files' '
test_config core.bigfilethreshold 1 &&
git archive HEAD >b3.tar &&
@@ -158,22 +150,15 @@ test_expect_success \
'git get-tar-commit-id <b.tar >b.commitid &&
test_cmp .git/$(git symbolic-ref HEAD) b.commitid'
-test_expect_success \
- 'git tar-tree with prefix' \
- 'git tar-tree HEAD prefix >c.tar'
-
-test_expect_success \
- 'extract tar archive with prefix' \
- '(mkdir c && cd c && "$TAR" xf -) <c.tar'
-
-test_expect_success \
- 'validate filenames with prefix' \
- '(cd c/prefix/a && find .) | sort >c.lst &&
- test_cmp a.lst c.lst'
+test_expect_success 'git tar-tree' '
+ git tar-tree HEAD >tar-tree.tar &&
+ test_cmp b.tar tar-tree.tar
+'
-test_expect_success \
- 'validate file contents with prefix' \
- 'diff -r a c/prefix/a'
+test_expect_success 'git tar-tree with prefix' '
+ git tar-tree HEAD prefix >tar-tree_with_prefix.tar &&
+ test_cmp with_prefix.tar tar-tree_with_prefix.tar
+'
test_expect_success 'git archive with --output, override inferred format' '
git archive --format=tar --output=d4.zip HEAD &&