Re: [PATCH 7/7] commit-graph.c: introduce '--[no-]check-oids'
- From
Taylor Blau <me@ttaylorr.com>
- Date
- May 4, 2020, 22:16 UTC
- Message-ID
- <20200504221647.GH45250@syl.local>
- In-Reply-To
- <xmqqv9lbhdee.fsf@gitster.c.googlers.com>
On Mon, May 04, 2020 at 09:29:29AM -0700, Junio C Hamano wrote:
Show 34 quoted lines
> Jeff King <peff@peff.net> writes:
>
> > On Sun, May 03, 2020 at 09:55:39AM -0700, Junio C Hamano wrote:
> >
> >> >> 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.
> >>
> >> If we had it for the past 180 days or so, that's not like " people
> >> have seen it for only a brief time", but working it around shouldn't
> >> be too difficult---they need to validate the input they feed to the
> >> command themselves (or do they need to do more?).
> >
> > Yeah, my point wasn't so much that it was brief as that we've had it
> > both ways, and nobody was complaining about it before v2.24.0 (the
> > type-restriction change came as a side effect of another tightening).
> >
> > But yeah, if somebody really wants that validation, they can do it
> > themselves with "cat-file --batch-check". Or even for-each-ref directly:
> >
> > git for-each-ref --format='%(objectname) %(objecttype) %(*objecttype)' |
> > awk '/commit/ { print $1 }' |
> > git commit-graph write --stdin-commits
> >
> > If you're using --stdin-commits, you're presumably processing the input
> > anyway (since otherwise you'd just be using --reachable).
> >
> > I suppose you could argue the other way, too (that the user could be
> > filtering out non-commits). But so far we have one data point in either
> > direction, and it wants the more forgiving behavior. :)
>
> Yup. I agree that Taylor outlined the best direction going forward.Thanks, both. I'll send a series to address this shortly. (I've been sitting on it in ttaylorr/git for a couple of days over the weekend, but a few other things today have gotten in the way of me sending it to the list.)
> Thanks.
Thanks, Taylor