Re: [PATCH 1/4] fetch-pack: save shallow file before fetching the pack

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

 



On Tue, Apr 2, 2013 at 1:53 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> writes:
>
>> index-pack --strict looks up and follows parent commits. If shallow
>> information is not ready by the time index-pack is run, index-pack may
>> be lead to non-existent objects. Make fetch-pack save shallow file to
>> disk before invoking index-pack.
>
> I think the problem the patch is trying to solve _is_ real, but I
> wonder if this is a correct approach to solve it.  What happens if
> we die in the middle after writing the updated shallow file
> prematurely?
>
> Perhaps the index-pack (or any "Git" process in general) needs to
> learn a way to use an alternate shallow file, instead of always
> using a hard-coded git_path("shallow"), so that you can flush an
> updated one to a to-be-the-next-shallow-file, run fetch-pack with
> that alternate shallow file, and rename it to the final name at the
> end after everything goes well, or something?

Yeah. I was focused on the clone case so it didn't matter but this
change applies to git-fetch as well. Will add new GIT_SHALLOW_FILE
environment variable.
--
Duy
--
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]