git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Taylor Blau" <me@ttaylorr.com>,
	"SZEDER Gábor" <szeder.dev@gmail.com>,
	git@vger.kernel.org, dstolee@microsoft.com,
	martin.agren@gmail.com
Subject: Re: [PATCH 7/7] commit-graph.c: introduce '--[no-]check-oids'
Date: Mon, 4 May 2020 10:59:37 -0400	[thread overview]
Message-ID: <20200504145937.GA11373@coredump.intra.peff.net> (raw)
In-Reply-To: <xmqq5zddj6us.fsf@gitster.c.googlers.com>

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. :)

-Peff

  reply	other threads:[~2020-05-04 14:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14  4:03 [PATCH 0/7] commit-graph: split strategies, '--[no-]check-oids' Taylor Blau
2020-04-14  4:04 ` [PATCH 1/7] t/helper/test-read-graph.c: support commit-graph chains Taylor Blau
2020-04-14  4:04 ` [PATCH 2/7] builtin/commit-graph.c: support for '--split[=<strategy>]' Taylor Blau
2020-04-14  4:04 ` [PATCH 3/7] builtin/commit-graph.c: introduce split strategy 'no-merge' Taylor Blau
2020-04-14  4:04 ` [PATCH 4/7] builtin/commit-graph.c: introduce split strategy 'replace' Taylor Blau
2020-04-14  4:04 ` [PATCH 5/7] oidset: introduce 'oidset_size' Taylor Blau
2020-04-14  4:04 ` [PATCH 6/7] commit-graph.h: replace 'commit_hex' with 'commits' Taylor Blau
2020-04-14  4:04 ` [PATCH 7/7] commit-graph.c: introduce '--[no-]check-oids' Taylor Blau
2020-04-15  4:29   ` Taylor Blau
2020-04-15  4:31     ` Taylor Blau
2020-04-22 10:55       ` SZEDER Gábor
2020-04-22 23:39         ` Taylor Blau
2020-04-24 10:59           ` SZEDER Gábor
2020-05-01 22:38             ` Taylor Blau
2020-05-03  9:40               ` Jeff King
2020-05-03 16:55                 ` Junio C Hamano
2020-05-04 14:59                   ` Jeff King [this message]
2020-05-04 16:29                     ` Junio C Hamano
2020-05-04 22:16                       ` Taylor Blau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200504145937.GA11373@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=martin.agren@gmail.com \
    --cc=me@ttaylorr.com \
    --cc=szeder.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).