summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-03-14 14:27:02 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-03-14 14:27:03 -0700
commitd552f8df1b2749b58e386dff98027c64f35cdbd1 (patch)
tree36dedb20c44f081e8d50a3459b520c861d52c51c /t
parentMerge branch 'rt/help-pretty-prints-cmd-names' (diff)
parentadd uploadarchive.allowUnreachable option (diff)
downloadtgif-d552f8df1b2749b58e386dff98027c64f35cdbd1.tar.xz
Merge branch 'sg/archive-restrict-remote'
Allow loosening remote "git archive" invocation security check that refuses to serve tree-ish not at the tip of any ref. * sg/archive-restrict-remote: add uploadarchive.allowUnreachable option docs: clarify remote restrictions for git-upload-archive
Diffstat (limited to 't')
-rwxr-xr-xt/t5000-tar-tree.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index 05f011d38e..1cf0a4e103 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -213,6 +213,15 @@ test_expect_success 'clients cannot access unreachable commits' '
test_must_fail git archive --remote=. $sha1 >remote.tar
'
+test_expect_success 'upload-archive can allow unreachable commits' '
+ test_commit unreachable1 &&
+ sha1=`git rev-parse HEAD` &&
+ git reset --hard HEAD^ &&
+ git archive $sha1 >remote.tar &&
+ test_config uploadarchive.allowUnreachable true &&
+ git archive --remote=. $sha1 >remote.tar
+'
+
test_expect_success 'setup tar filters' '
git config tar.tar.foo.command "tr ab ba" &&
git config tar.bar.command "tr ab ba" &&