Re: [PATCH 1/3] serve: pass "config context" through to individual commands
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Dec 14, 2018, 08:36 UTC
- Message-ID
- <20181214083621.GA7121@google.com>
- In-Reply-To
- <20181211104342.GA7233@sigill.intra.peff.net>
Hi,
Jeff King wrote:
Show 7 quoted lines
> In protocol v2, instead of just running "upload-pack", we have a generic > "serve" loop which runs command requests from the client. What used to > be "upload-pack" is now generally split into two operations: "ls-refs" > and "fetch". The latter knows it must respect uploadpack.* config, but > the former is not actually specific to a fetch operation (we do not yet > do v2 receive-pack, but eventually we may, and ls-refs would support > both operations).
I think I'm missing something. Why wouldn't "ls-refs for push" not pass the information that it's for push as part of the *body* of the ls-refs request?
(That's a separate issue from whether we need to have ls-refs for push at all, as opposed to specifying a policy for the requested ref updates and getting a list of "have"s without ref names attached. But that's a discussion for another day.)
Is there some other more immediate motivation for this patch? In the spirit of YAGNI, I would rather understand that motivation instead of one that in many possible designs would never materialize.
Thanks, Jonathan