Re: [PATCHv5] sha1_file: fix iterating loose alternate objects

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

 



On Mon, Feb 02, 2015 at 12:05:54PM -0800, Jonathon Mah wrote:

> Simplified test per Junio (verified that it fails before and passes
> now). Punting on Jeff's "more elaborate example".

I think that's fine. I started to try to create such an example, but
it's actually rather tricky. If the alternate has the tip object, then
one of these must be true:

  1. It has all of the objects the tip depends on.

  2. It is missing an object, and this tip is part of the referenced
     history.

  3. It is missing an object, but this part of history is not
     referenced.

In case (1), we do not care about deleting objects from the base
repository; we already have another copy in the alternate.

In case (2), the alternate is corrupt, and all bets are off.

In case (3), we can only have dropped the object from the alternate by
pruning it and keeping the tip object that refers to it. Which is the
exact thing that this new code was added to avoid (to always keep
depended-upon objects).

So I actually do not see how the situation would come up in practice,
and possibly we could drop the iteration of the alternates' loose
objects entirely from this code. But certainly that is orthogonal to
Jonathon's fix (which is a true regression for the less-exotic case that
his test demonstrates).

-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]