diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-12-13 22:47:38 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-13 22:47:38 -0800 |
commit | 3c4b5ad5a5d4356948f1207908bd3ba62b1a7773 (patch) | |
tree | a647d823c1b75f86b5f5b4ec8147a50c42aba6d1 /t | |
parent | Merge branch 'jn/gitweb-side-by-side-diff' (diff) | |
parent | Merge branch 'jk/maint-1.6.2-upload-archive' into jk/maint-upload-archive (diff) | |
download | tgif-3c4b5ad5a5d4356948f1207908bd3ba62b1a7773.tar.xz |
Merge branch 'jk/maint-upload-archive'
* jk/maint-upload-archive:
archive: don't let remote clients get unreachable commits
Diffstat (limited to 't')
-rwxr-xr-x | t/t5000-tar-tree.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index d9068981f8..c05c676ca2 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -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 && ( |