aboutsummaryrefslogtreecommitdiff
path: root/t/t5000-tar-tree.sh
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2013-05-20 11:58:27 +0200
committerJunio C Hamano <gitster@pobox.com>2013-05-20 15:31:45 -0700
commit03d9bc564b3e87a2cdf4d511c8707a2de54ee6c6 (patch)
tree42950037d9831c4af69affa0757d80b9e7bb5af3 /t/t5000-tar-tree.sh
parentdeb9c8ed858e431008695fa265e8b20f547192bc (diff)
downloadgit-03d9bc564b3e87a2cdf4d511c8707a2de54ee6c6.tar.gz
git-03d9bc564b3e87a2cdf4d511c8707a2de54ee6c6.tar.xz
t5000: use check_tar for prefix test
Perform the full range of checks against all archived files instead of looking only at the file type of a few of them. Also add a test of a git archive with a prefix ending in with a slash, i.e. adding a full directory level. 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.sh24
1 files changed, 12 insertions, 12 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index 8337a1f2c..5a9b5703a 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -103,6 +103,18 @@ test_expect_success \
check_tar b
+test_expect_success 'git archive --prefix=prefix/' '
+ git archive --prefix=prefix/ HEAD >with_prefix.tar
+'
+
+check_tar with_prefix prefix/
+
+test_expect_success 'git-archive --prefix=olde-' '
+ git archive --prefix=olde- HEAD >with_olde-prefix.tar
+'
+
+check_tar with_olde-prefix olde-
+
test_expect_success \
'git tar-tree' \
'git tar-tree HEAD >b2.tar'
@@ -180,18 +192,6 @@ test_expect_success 'clients cannot access unreachable commits' '
test_must_fail git archive --remote=. $sha1 >remote.tar
'
-test_expect_success 'git-archive --prefix=olde-' '
- git archive --prefix=olde- >h.tar HEAD &&
- (
- mkdir h &&
- cd h &&
- "$TAR" xf - <../h.tar
- ) &&
- test -d h/olde-a &&
- test -d h/olde-a/bin &&
- test -f h/olde-a/bin/sh
-'
-
test_expect_success 'setup tar filters' '
git config tar.tar.foo.command "tr ab ba" &&
git config tar.bar.command "tr ab ba" &&