From: Jonathan Nieder Date: Thu, 31 May 2018 00:43:09 GMT Subject: Re: [PATCH 1/2] refspec: consolidate ref-prefix generation logic Message-ID: <20180531004309.GA36515@aiede.svl.corp.google.com> In-Reply-To: <20180516234822.182663-2-bmwill@google.com> Hi, Brandon Williams wrote: > When using protocol v2 a client constructs a list of ref-prefixes which > are sent across the wire so that the server can do server-side filtering > of the ref-advertisement. The logic that does this exists for both > fetch and push (even though no push support for v2 currently exists yet) > and is roughly the same so lets consolidate this logic and make it > general enough that it can be used for both the push and fetch cases. > > Signed-off-by: Brandon Williams > --- > builtin/fetch.c | 13 +------------ > refspec.c | 29 +++++++++++++++++++++++++++++ > refspec.h | 4 ++++ > transport.c | 21 +-------------------- > 4 files changed, 35 insertions(+), 32 deletions(-) I assume this is meant to be a refactoring with no functional change. Alas, it's causing fetch-by-SHA-1 to fail for me: $ rm -fr /tmp/r $ git init /tmp/r Initialized empty Git repository in /tmp/r/.git/ $ bin-wrappers/git -C /tmp/r -c protocol.version=2 fetch \ https://kernel.googlesource.com/pub/scm/git/git \ 6373cb598e1a4e0340583ad75d5abba01ff79774 fatal: no matching remote head The parent commit succeeds. Known issue? Thanks, Jonathan