From: Jeff Hostetler Date: Mon, 09 Sep 2019 20:03:09 GMT Subject: Re: [PATCH v3 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir' Message-ID: <7883417c-56a8-a38e-af2f-81b90b2dd7d3@jeffhostetler.com> In-Reply-To: <20190909170823.GA30470@sigill.intra.peff.net> On 9/9/2019 1:08 PM, Jeff King wrote: > On Mon, Sep 09, 2019 at 09:54:36AM -0400, Jeff Hostetler wrote: > >> It would be nice if we could continue to let parse_list_objects_filter() >> do the syntax checking -- that is, we can still check that we received a >> ulong in "blob:limit:" and that "sparse:oid:" looks like a hex >> value, for example. Just save the actual lookup to the higher >> layer, if and when that makes sense. > > Yeah, I agree that is the right place to do syntactic checking. But I > think we can't do much checking for the sparse-oid. We currently accept > not just a hex oid, but any name. And I think that is useful; I should > be able to say "master:sparse-file" and have it resolved by the remote > side. Right. I forgot about the "master:sparse-file" case and was only thinking about the hex oid case. The sparse-file case is very useful. > > So it really is "any name which is syntactically resolvable as a sha1 > expression". At which point I think you might as well punt and just wait > until we _actually_ try to resolve the name to see if it's valid. > > I'll work up what I sent earlier into a real patch, and include some of > this discussion. > > -Peff > thanks Jeff