git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [PATCH v2 0/2] fsck --connectivity-only --dangling
Date: Mon, 4 Mar 2019 23:45:30 -0500	[thread overview]
Message-ID: <20190305044530.GG19800@sigill.intra.peff.net> (raw)
In-Reply-To: <20190305042601.GF19800@sigill.intra.peff.net>

On Mon, Mar 04, 2019 at 11:26:01PM -0500, Jeff King wrote:

> > > So I sketched up what it might look like to just fix the bug (but kick
> > > in only when needed), which is below.
> > 
> > As the primariy purose of the --conn-only option being such, perhaps
> > we should have made --no-dangling the default when --conn-only is in
> > effect.
> 
> Yes, perhaps. Though after thinking on this for a few days, I actually
> think there is no real reason not to just have --dangling do the right
> thing here (and we're still much faster than a full fsck, and not much
> slower than the current code unless you happen to have a large number
> of unreachable commits and trees).
> 
> And then if the user says "--no-dangling", we can be even faster (i.e.,
> the same as the current code).
> 
> We could also make "--no-dangling" the default for
> "--connectivity-only", though I do not have a strong feeling either way.

So here's a re-rolled series. The first patch just clarifies how
--connectivity-only works, since there are a few subtle points that came
up in this thread.

The second one is my fix from before. That lets us drop the initial
"explain why it doesn't work" documentation patch, though I did add a
note to the documentation pointing the user to --no-dangling.

  [1/2]: doc/fsck: clarify --connectivity-only behavior
  [2/2]: fsck: always compute USED flags for unreachable objects

 Documentation/git-fsck.txt | 14 +++++++--
 builtin/fsck.c             | 62 ++++++++++++++++++++++++++++++++++++++
 t/t1450-fsck.sh            | 19 ++++++++++--
 3 files changed, 90 insertions(+), 5 deletions(-)

-Peff

  reply	other threads:[~2019-03-05  4:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27 14:55 [PATCH] doc/fsck: discuss mix of --connectivity-only and --dangling Jeff King
2019-02-27 14:59 ` Jeff King
2019-03-01  2:50   ` Junio C Hamano
2019-03-05  4:26     ` Jeff King
2019-03-05  4:45       ` Jeff King [this message]
2019-03-05  4:46         ` [PATCH v2 1/2] doc/fsck: clarify --connectivity-only behavior Jeff King
2019-03-05  4:47         ` [PATCH v2 2/2] fsck: always compute USED flags for unreachable objects Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20190305044530.GG19800@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).