Re: [RFC/PATCH 5/9] ref-filter: add option to match literal pattern

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

 



On Mon, Jun 29, 2015 at 11:50 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Karthik Nayak <karthik.188@xxxxxxxxx> writes:
>
>> Since 'ref-filter' only has an option to match path names.
>
> That is not a whole sentence ;-)
>

Argh! Noted.

>> Add an option for regular pattern matching.
>
>> Mentored-by: Christian Couder <christian.couder@xxxxxxxxx>
>> Mentored-by: Matthieu Moy <matthieu.moy@xxxxxxxxxxxxxxx>
>> Signed-off-by: Karthik Nayak <karthik.188@xxxxxxxxx>
>
>> -     if (flag & REF_BAD_NAME) {
>> -               warning("ignoring ref with broken name %s", refname);
>> -               return 0;
>> -     }
>> -
>
> Hmm, where did this check go in the new code?  Or is it now OK not
> to warn or ignore, and if so why?
>

Merge conflict, I've replied with a fixing patch, shouldn't be there
in the next version :)

>>       if (flag & REF_ISBROKEN) {
>>               warning("ignoring broken ref %s", refname);
>>               return 0;
>>       }
>>
>> -     if (*filter->name_patterns && !match_name_as_path(filter->name_patterns, refname))
>> +     if (!filter_pattern_match(filter, refname))
>>               return 0;
>>
>>       if (!match_points_at(&filter->points_at, oid->hash, refname))
>
>> diff --git a/ref-filter.h b/ref-filter.h
>> index 6b6fb96..a4809c8 100644
>> --- a/ref-filter.h
>> +++ b/ref-filter.h
>> @@ -54,7 +54,8 @@ struct ref_filter {
>>       } merge;
>>       struct commit *merge_commit;
>>
>> -     unsigned int with_commit_tag_algo: 1;
>> +     unsigned int with_commit_tag_algo: 1,
>> +             match_as_path: 1;
>
> Lose SP on both sides of the colon, or have SP on both sides
> (same for the last patch in the previous series).

Will Do!

Thanks for the quick review.

-- 
Regards,
Karthik Nayak
--
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]