summaryrefslogtreecommitdiff
path: root/t/t5550-http-fetch-dumb.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-02-27 21:57:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-02-27 21:57:16 (GMT)
commitace83dc26a13ada8f6b2c011b01fc0ae9e48b86f (patch)
tree7e66e48d3ebd4660bc7c708ec099f46629e5bc1c /t/t5550-http-fetch-dumb.sh
parent036465a248df7b0876e65d0e137826203305c606 (diff)
parent4b0c3c7735716e8e1faba9a25b4aebf019d8570a (diff)
downloadgit-ace83dc26a13ada8f6b2c011b01fc0ae9e48b86f.zip
git-ace83dc26a13ada8f6b2c011b01fc0ae9e48b86f.tar.gz
git-ace83dc26a13ada8f6b2c011b01fc0ae9e48b86f.tar.bz2
Merge branch 'jn/remote-helpers-with-git-dir'
"git ls-remote" and "git archive --remote" are designed to work without being in a directory under Git's control. However, recent updates revealed that we randomly look into a directory called .git/ without actually doing necessary set-up when working in a repository. Stop doing so. * jn/remote-helpers-with-git-dir: remote helpers: avoid blind fall-back to ".git" when setting GIT_DIR remote: avoid reading $GIT_DIR config in non-repo
Diffstat (limited to 't/t5550-http-fetch-dumb.sh')
-rwxr-xr-xt/t5550-http-fetch-dumb.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh
index aeb3a63..b69ece1 100755
--- a/t/t5550-http-fetch-dumb.sh
+++ b/t/t5550-http-fetch-dumb.sh
@@ -34,6 +34,15 @@ test_expect_success 'clone http repository' '
test_cmp file clone/file
'
+test_expect_success 'list refs from outside any repository' '
+ cat >expect <<-EOF &&
+ $(git rev-parse master) HEAD
+ $(git rev-parse master) refs/heads/master
+ EOF
+ nongit git ls-remote "$HTTPD_URL/dumb/repo.git" >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'create password-protected repository' '
mkdir -p "$HTTPD_DOCUMENT_ROOT_PATH/auth/dumb/" &&
cp -Rf "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \