Re: [PATCH 3/3] sparse checkout: do not eagerly decide the fate for whole directory

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

 



2011/5/3 Thiago Farina <tfransosi@xxxxxxxxx>:
>> This generally works as long as there are no patterns to exclude parts
>> of the directory. In case of sparse checkout code, the following patterns
>>
>> Ât
>> Â!t/t0000-basic.sh
>>
>> will produce a worktree with full directory "t" even if t0000-basic.sh
>> is requested to stay out.
>> ...
>> Â Â Â Âprefix[prefix_len++] = '/';
>>
>> - Â Â Â /* included, no clearing for any entries under this directory */
>> - Â Â Â if (!ret) {
>> - Â Â Â Â Â Â Â for (; cache != cache_end; cache++) {
>> - Â Â Â Â Â Â Â Â Â Â Â struct cache_entry *ce = *cache;
>> - Â Â Â Â Â Â Â Â Â Â Â if (strncmp(ce->name, prefix, prefix_len))
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â break;
>> - Â Â Â Â Â Â Â }
>> - Â Â Â Â Â Â Â return nr - (cache_end - cache);
>> - Â Â Â }
>> + Â Â Â /* If undecided, use parent directory's decision in defval */
> What means "use parent directory's decision"? Could you make this
> comment more clearer?

Take the example patterns in commit message, we know that we match
directory "t" (pattern 1). When we check t/0001-init.sh, no patterns
match it. But because it's under "t", so we consider it matched. On
the other hand, t/t0000-basic.sh will match pattern 2 and override
parent directory's decision.

>> + Â Â Â if (ret < 0)
>> + Â Â Â Â Â Â Â ret = defval;
>>
>> - Â Â Â /* excluded, clear all selected entries under this directory. */
> Start with capital letter?

It's a line removal, what can I do about it?
-- 
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]