summaryrefslogtreecommitdiff
path: root/t/t5000-tar-tree.sh
diff options
context:
space:
mode:
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 c942c8b..1a2ee10 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -213,4 +213,12 @@ 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_done