From: Jonathan Nieder Date: Mon, 15 May 2017 17:46:38 GMT Subject: Re: [PATCH v7] fetch-pack: always allow fetching of literal SHA1s Message-ID: <20170515174638.GJ27400@aiede.svl.corp.google.com> In-Reply-To: <20170515173220.13103-1-jonathantanmy@google.com> Jonathan Tan wrote: > 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 > Signed-off-by: Jonathan Tan > --- > fetch-pack.c | 40 ++++++++++++++++++++++++++++++++++++++-- > t/t5500-fetch-pack.sh | 35 +++++++++++++++++++++++++++++++++++ > 2 files changed, 73 insertions(+), 2 deletions(-) Reviewed-by: Jonathan Nieder I think we've done enough golf on this one. Thanks for your patient work. Jonathan