Re: [PATCH 5/5] unpack_trees(): add support for sparse checkout

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

 



2009/7/29 Jakub Narebski <jnareb@xxxxxxxxx>:
> Nguyễn Thái Ngọc Duy    <pclouds@xxxxxxxxx> writes:
>
>> This patch teaches unpack_trees() to checkout/remove entries
>> on working directories appropriately when sparse checkout area is
>> changed. A helper "git shape-workdir" is needed to help determine
>> which entry will be checked out, which will be not.
>
> Wouldn't "git update-index --index-info" (perhaps extended) be enough?

It's a bit more complicated because the in-memory index is filled with
various information and can't just be dumped out to be manipulated
with "git update-index".

>>
>> "git shape-workdir" will receive from stdin in this format
>>
>> X\tpathname
>>
>> where X is either
>>  - '!' current entry is already CE_VALID
>>  - 'N' current entry is "new" (it has not been in index before)
>>  - '-' current entry is "normal" entry
>>
>> "git shape-workdir" is expected to return either "1" or "0"
>> immediately. "1" means the entry should be in workdir. "0" means
>> setting CE_VALID and get rid of it from workdir.
>
> Just in case it would be better IMVHO if it returned "1\tpathname" or
> "2\tpathname".  By the way, is 'pathname' quoted if necessary, and
> does git-shape-workdir support -z/--null option?

It doesn't currently. Thanks for the suggestion.

> Signoff (also in some other patches in this series)?

This series is mainly for taking input on how git-shape-workdir should
behave, what format is good... That's why I did not sign off. Anyway
the series is not really well tested (and obvious lacks tests)
-- 
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]