Re: [PATCH] has_sha1_file: re-check pack directory before giving up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]