Re: [PATCH 7/7] commit-graph.c: introduce '--[no-]check-oids'
- From
Jeff King <peff@peff.net>
- Date
- May 3, 2020, 09:40 UTC
- Message-ID
- <20200503094005.GD170902@coredump.intra.peff.net>
- In-Reply-To
- <20200501223848.GH41612@syl.local>
On Fri, May 01, 2020 at 04:38:48PM -0600, Taylor Blau wrote:
Show 19 quoted lines
> But, are there ever any callers that *wouldn't* want this behavior? As
> far as I can tell, probably not. We're only going to be permitting
> *more* inputs to 'git commit-graph write', and I seriously doubt that
> anybody is depending on the above behavior. (Of course, if that's not
> the case, I'd love for somebody to speak up here and we can continue
> the course on this patch).
>
> So, I propose the following:
>
> * We drop the idea of '--[no-]{check,verify}-oids', and always
> silently ignore non-commit inputs, retaining the existing behavior
> of always complaining about things that aren't valid hex OIDs, such
> as "HEAD".
>
> * We always error out on missing or corrupt commit OIDs, including
> valid OIDs that don't resolve to any object, or resolve to a tag
> that can't be fully peeled.
>
> Does that seem reasonable?FWIW, I think that is the best direction. If anybody is depending on the "commit-graph write will complain about non-commits" behavior, they could only be doing so for a few versions; prior to v2.24.0 we did not.
-Peff