summaryrefslogtreecommitdiff
path: root/t/t5000-tar-tree.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-11-21 23:04:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-11-21 23:04:11 (GMT)
commit7b51c33b376d22195dba1c4e067180164fd35dbf (patch)
treeefaf7471d6ab92f207ac819d1e90ead43a86d4f2 /t/t5000-tar-tree.sh
parentbd5bce7cbc55fa52277cc8a39f673c3e2dc60670 (diff)
parentee27ca4a781844ddbf556ec64daae24d748a7c5a (diff)
downloadgit-7b51c33b376d22195dba1c4e067180164fd35dbf.zip
git-7b51c33b376d22195dba1c4e067180164fd35dbf.tar.gz
git-7b51c33b376d22195dba1c4e067180164fd35dbf.tar.bz2
Merge branch 'jk/maint-1.6.2-upload-archive' into jk/maint-upload-archive
* jk/maint-1.6.2-upload-archive: archive: don't let remote clients get unreachable commits Conflicts: archive.c archive.h builtin-archive.c builtin/upload-archive.c t/t5000-tar-tree.sh
Diffstat (limited to 't/t5000-tar-tree.sh')
-rwxr-xr-xt/t5000-tar-tree.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index d906898..c05c676 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 &&
(