summaryrefslogtreecommitdiff
path: root/t/t5551-http-fetch-smart.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-19 04:34:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-19 04:34:07 (GMT)
commit0527fbab689929de47ab3fa7baf1e7618ffa704f (patch)
tree225a1b7916ff4b81f30d661f0014f973eea38642 /t/t5551-http-fetch-smart.sh
parentd4cd2dd214c9800c8ccf45cf413acc727f4abcc2 (diff)
parente70a3030e747312327a4f3619247bf8a986aa577 (diff)
downloadgit-0527fbab689929de47ab3fa7baf1e7618ffa704f.zip
git-0527fbab689929de47ab3fa7baf1e7618ffa704f.tar.gz
git-0527fbab689929de47ab3fa7baf1e7618ffa704f.tar.bz2
Merge branch 'jt/avoid-ls-refs'
Over some transports, fetching objects with an exact commit object name can be done without first seeing the ref advertisements. The code has been optimized to exploit this. * jt/avoid-ls-refs: fetch: do not list refs if fetching only hashes transport: list refs before fetch if necessary transport: do not list refs if possible transport: allow skipping of ref listing
Diffstat (limited to 't/t5551-http-fetch-smart.sh')
-rwxr-xr-xt/t5551-http-fetch-smart.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh
index 3dc8f8e..8630b0c 100755
--- a/t/t5551-http-fetch-smart.sh
+++ b/t/t5551-http-fetch-smart.sh
@@ -381,6 +381,21 @@ test_expect_success 'using fetch command in remote-curl updates refs' '
test_cmp expect actual
'
+test_expect_success 'fetch by SHA-1 without tag following' '
+ SERVER="$HTTPD_DOCUMENT_ROOT_PATH/server" &&
+ rm -rf "$SERVER" client &&
+
+ git init "$SERVER" &&
+ test_commit -C "$SERVER" foo &&
+
+ git clone $HTTPD_URL/smart/server client &&
+
+ test_commit -C "$SERVER" bar &&
+ git -C "$SERVER" rev-parse bar >bar_hash &&
+ git -C client -c protocol.version=0 fetch \
+ --no-tags origin $(cat bar_hash)
+'
+
test_expect_success 'GIT_REDACT_COOKIES redacts cookies' '
rm -rf clone &&
echo "Set-Cookie: Foo=1" >cookies &&