Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-12-21 23:42:44 +0400
committerJunio C Hamano <gitster@pobox.com>2011-12-21 23:42:44 +0400
commit1a7bd4fcfa0c57617828dfc1b6b525af674f6d49 (patch)
tree25c1079078e4d4626799de524537de40ea98e7d7 /t
parenta31275d6ffd35bc1c269b7136f4031abe2abee70 (diff)
parent7b51c33b376d22195dba1c4e067180164fd35dbf (diff)
Merge branch 'jk/maint-upload-archive' into maint
* jk/maint-upload-archive: archive: don't let remote clients get unreachable commits
Diffstat (limited to 't')
-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 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 &&
(