Re: [PATCH 1/5] ref-filter: support different email formats

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

 



Hariom verma <hariom18599@xxxxxxxxx> writes:

>> The ref-filter formatting language already knows many "colon plus
>> modifier" suffix like "refname:short" and "contents:body", but I do
>> not think we have ugly repetition like the above code to parse them.
>> Perhaps the addition for "email:<whatever>" can benefit from
>> studying and mimicking existing practices a bit more?
>>
>
> For "email:<whatever>",
> even If I parse that <whatever>. I still make comparison something like:
> ```
> if (!modifier)
>     email_option.option = EO_RAW;
> else if (!strcmp(modifier, "trim"))
>     email_option.option = EO_TRIM;
> else if (!strcmp(arg, "localpart"))
>     email_option.option = EO_LOCALPART;
> ```

Somebody needs to do a comparison, but it should be done at parsing
phase when the --format is grokked, not in grab phase that is run
for each and every ref to be shown.

These patches should only be done after looking at existing
"<basicatom>:<modifiers>" like "objectname:short" etc are handled,
not before, I think.



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

  Powered by Linux