Re: [PATCH 6/7] read-cache: refuse to create index referring to external objects
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jan 28, 2013, 05:57 UTC
- Message-ID
- <CACsJy8CXC=poDBenBwo6t8=Qv-_zvGbvHYo-cDdGA8_fpw4Cyg@mail.gmail.com>
- In-Reply-To
- <7vy5fdyhs0.fsf@alter.siamese.dyndns.org>
On Mon, Jan 28, 2013 at 12:54 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 18 quoted lines
> Duy Nguyen <pclouds@gmail.com> writes: > >> On Sat, Jan 26, 2013 at 2:00 AM, Junio C Hamano <gitster@pobox.com> wrote: >>> This is not a tangent, but if you want to go this "forbid making our >>> repository depend on objects we do not have but we know about after >>> we peek submodule odb" route [*1*], write_sha1_file() needs to be >>> told about has_sha1_file_proper(). We may "git add" a new blob in >>> the superproject, the blob may not yet exist in *our* repository, >>> but may happen to already exist in the submodue odb. In such a >>> case, write_sha1_file() has to write that blob in our repository, >>> without the existing has_sha1_file() check bypassing it. Otherwise >>> our attempt to create a tree that contains that blob will fail, >>> saying that the blob only seems to exist to us via submodule odb but >>> not in our repository. >> >> Another thing needs to be done for this to work. The current reading > > For *what* to work???
The "forbid making our repository depend on objects we do not have but we know about afterwe peek submodule odb"
Show 8 quoted lines
> I think the performance consideration is the > only thing that should drive the read-order; correctness should not > be affected. > >> order is packs first, loose objects next. If we create a local loose >> duplicate of an alternate packed object, our local version will never >> be read. Regardless the submodule odb issue, I think we should prefer >> reading local loose objects over alternate packed ones.
-- Duy