Skip to content

Commit 7fa8ddd

Browse files
Nick HengeveldJunio C Hamano
authored andcommitted
git-ls-remote: send no-cache header when fetching info/refs
Proxies should not cache this file as it can cause a client to end up with a stale version, as reported here: http://marc.theaimsgroup.com/?l=git&m=114407944125389 Signed-off-by: Nick Hengeveld <nickh@reactrix.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 810e152 commit 7fa8ddd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-ls-remote.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ http://* | https://* )
5353
if [ -n "$GIT_SSL_NO_VERIFY" ]; then
5454
curl_extra_args="-k"
5555
fi
56-
curl -nsf $curl_extra_args "$peek_repo/info/refs" ||
56+
curl -nsf $curl_extra_args --header "Pragma: no-cache" "$peek_repo/info/refs" ||
5757
echo "failed slurping"
5858
;;
5959

0 commit comments

Comments
 (0)