diff options
Diffstat (limited to 't/t5000-tar-tree.sh')
-rwxr-xr-x | t/t5000-tar-tree.sh | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index d9068981f8..527c9e7548 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -96,7 +96,7 @@ test_expect_success 'git archive with --output' \ 'git archive --output=b4.tar HEAD && test_cmp b.tar b4.tar' -test_expect_success NOT_MINGW 'git archive --remote' \ +test_expect_success 'git archive --remote' \ 'git archive --remote=. HEAD >b5.tar && test_cmp b.tar b5.tar' @@ -242,6 +242,14 @@ test_expect_success \ 'git archive --list outside of a git repo' \ 'GIT_DIR=some/non-existing/directory git archive --list' +test_expect_success 'clients cannot access unreachable commits' ' + test_commit unreachable && + sha1=`git rev-parse HEAD` && + git reset --hard HEAD^ && + git archive $sha1 >remote.tar && + test_must_fail git archive --remote=. $sha1 >remote.tar +' + test_expect_success 'git-archive --prefix=olde-' ' git archive --prefix=olde- >h.tar HEAD && ( @@ -266,7 +274,7 @@ test_expect_success 'archive --list mentions user filter' ' grep "^bar\$" output ' -test_expect_success NOT_MINGW 'archive --list shows only enabled remote filters' ' +test_expect_success 'archive --list shows only enabled remote filters' ' git archive --list --remote=. >output && ! grep "^tar\.foo\$" output && grep "^bar\$" output @@ -298,7 +306,7 @@ test_expect_success 'extension matching requires dot' ' test_cmp b.tar config-implicittar.foo ' -test_expect_success NOT_MINGW 'only enabled filters are available remotely' ' +test_expect_success 'only enabled filters are available remotely' ' test_must_fail git archive --remote=. --format=tar.foo HEAD \ >remote.tar.foo && git archive --remote=. --format=bar >remote.bar HEAD && @@ -341,12 +349,12 @@ test_expect_success GZIP,GUNZIP 'extract tgz file' ' test_cmp b.tar j.tar ' -test_expect_success GZIP,NOT_MINGW 'remote tar.gz is allowed by default' ' +test_expect_success GZIP 'remote tar.gz is allowed by default' ' git archive --remote=. --format=tar.gz HEAD >remote.tar.gz && test_cmp j.tgz remote.tar.gz ' -test_expect_success GZIP,NOT_MINGW 'remote tar.gz can be disabled' ' +test_expect_success GZIP 'remote tar.gz can be disabled' ' git config tar.tar.gz.remote false && test_must_fail git archive --remote=. --format=tar.gz HEAD \ >remote.tar.gz |