Re: [PATCH 14/21] Convert ce_path_match() to use struct pathspec

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

 



2010/12/17 Junio C Hamano <gitster@xxxxxxxxx>:
> Nguyán ThÃi Ngác Duy Â<pclouds@xxxxxxxxx> writes:
>
>> diff --git a/diff-lib.c b/diff-lib.c
>> index 3b809f2..63db7f4 100644
>> --- a/diff-lib.c
>> +++ b/diff-lib.c
>> @@ -89,9 +89,11 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
>> Â Â Â int silent_on_removed = option & DIFF_SILENT_ON_REMOVED;
>> Â Â Â unsigned ce_option = ((option & DIFF_RACY_IS_MODIFIED)
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â ? CE_MATCH_RACY_IS_DIRTY : 0);
>> + Â Â struct pathspec pathspec;
>>
>> Â Â Â diff_set_mnemonic_prefix(&revs->diffopt, "i/", "w/");
>>
>> + Â Â init_pathspec(&pathspec, revs->prune_data);
>
> I wonder if it makes more sense to change the type of revs->prune_data
> from an array of pointers to strings to a pointer to struct pathspec.
> Is there a downside?

Converting a pointer to another pointer means mis typecasting can
happen and the compiler won't help catching them. I thinking of
changing prune_data to simply struct pathspec. Looks like it breaks
thing.. hm...
-- 
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]