Re: [PATCH/WIP 05/11] symbolize return values of tree_entry_interesting()

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

 



2011/10/28 Junio C Hamano <gitster@xxxxxxxxx>:
>>  static void skip_uninteresting(struct tree_desc *t, struct strbuf *base,
>> -                            struct diff_options *opt, int *match)
>> +                            struct diff_options *opt,
>> +                            enum interesting *match)
>>  {
>>       while (t->size) {
>>               *match = tree_entry_interesting(&t->entry, base, 0, &opt->pathspec);
>>               if (*match) {
>> -                     if (*match < 0)
>> +                     if (*match == all_entries_not_interesting)
>>                               t->size = 0;
>>                       break;
>>               }
>
> The caller of this function needs to be updated as well.

Yeah, thanks.

> But I have to wonder why this skip_uninteresting() does not peek the
> original value of *match and skip, which is the loop structure the other
> caller of tree_entry_interesting() in this file has.

Probably because no one asked that question before. I think it makes
sense for skip_uninteresting() to skip t_e_i() when *match == -1 or 2.
Thanks.
-- 
Duy
��.n��������+%������w��{.n��������n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�

[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]