summaryrefslogtreecommitdiff
path: root/remote-curl.c
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2017-05-15 10:32:20 -0700
committerJunio C Hamano <gitster@pobox.com>2017-05-16 10:17:05 +0900
commitfdb69d33c43eb56a564a3e1c805dea4b29162667 (patch)
treed8b692594ae2b1c4baea45d1df966607a7b41353 /remote-curl.c
parentb06d3643105c8758ed019125a4399cb7efdcce2c (diff)
downloadgit-jt/fetch-allow-tip-sha1-implicitly.tar.gz
fetch-pack: always allow fetching of literal SHA1sjt/fetch-allow-tip-sha1-implicitly
fetch-pack, when fetching a literal SHA-1 from a server that is not configured with uploadpack.allowtipsha1inwant (or similar), always returns an error message of the form "Server does not allow request for unadvertised object %s". However, it is sometimes the case that such object is advertised. This situation would occur, for example, if a user or a script was provided a SHA-1 instead of a branch or tag name for fetching, and wanted to invoke "git fetch" or "git fetch-pack" using that SHA-1. Teach fetch-pack to also check the SHA-1s of the refs in the received ref advertisement if a literal SHA-1 was given by the user. Helped-by: Jeff King <peff@peff.net> Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote-curl.c')
0 files changed, 0 insertions, 0 deletions