From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Cc: Michael Haggerty <mhagger@alum.mit.edu>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] has_sha1_file: re-check pack directory before giving up
Date: Fri, 30 Aug 2013 00:28:01 -0400 [thread overview]
Message-ID: <20130830042801.GA23780@sigill.intra.peff.net> (raw)
In-Reply-To: <20130830011052.GA21895@sigill.intra.peff.net>
On Thu, Aug 29, 2013 at 09:10:52PM -0400, Jeff King wrote:
> In the case of git-fsck, which uses the
> DO_FOR_EACH_INCLUDE_BROKEN flag, this will cause us to
> erroneously complain that the ref points to an invalid
> object. But for git-repack, which does not use that flag, we
> will skip the ref completely!
Hmm. This is slightly inaccurate. fsck does not use INCLUDE_BROKEN, and
that is why it recognizes (and prints the warning) the "broken" ref.
pack-objects would also print a warning, but would dutifully ignore the
broken ref during the repack.
So it is actually something like for-each-ref, which _does_ use
INCLUDE_BROKEN, that behaves differently. And it tends to work, because
it ends up calling read_sha1_file to find out about the file rather than
checking has_sha1_file.
-Peff
next prev parent reply other threads:[~2013-08-30 4:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-30 1:10 [PATCH] has_sha1_file: re-check pack directory before giving up Jeff King
2013-08-30 1:40 ` Eric Sunshine
2013-08-30 4:17 ` Junio C Hamano
2013-08-30 4:25 ` Jeff King
2013-08-30 4:28 ` Jeff King [this message]
2013-08-30 19:14 ` [PATCHv2] " 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130830042801.GA23780@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mhagger@alum.mit.edu \
/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).