Re: [PATCH v4 10/12] ref-filter: introduce remote_ref_atom_parser()

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

 



On Fri, Feb 5, 2016 at 5:35 AM, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
> On Sun, Jan 31, 2016 at 11:12:54PM +0530, Karthik Nayak wrote:
>> Introduce remote_ref_atom_parser() which will parse the '%(upstream)'
>> and '%(push)' atoms and store information into the 'used_atom'
>> structure based on the modifiers used along with the corresponding
>> atom.
>>
>> Signed-off-by: Karthik Nayak <Karthik.188@xxxxxxxxx>
>> ---
>> diff --git a/ref-filter.c b/ref-filter.c
>> @@ -50,6 +52,20 @@ static void color_atom_parser(struct used_atom *atom, const char *color_value)
>> +static void remote_ref_atom_parser(struct used_atom *atom, const char *arg)
>> +{
>> +     if (!arg) {
>> +             atom->u.remote_ref = RR_NORMAL;
>> +     } else if (!strcmp(arg, "short"))
>
> Style: drop unnecessary braces
>

Will do.

>> +             atom->u.remote_ref = RR_SHORTEN;
>> +     else if (!strcmp(arg, "track"))
>> +             atom->u.remote_ref = RR_TRACK;
>> +     else if (!strcmp(arg, "trackshort"))
>> +             atom->u.remote_ref = RR_TRACKSHORT;
>> +     else
>> +             die(_("unrecognized format: %%(%s)"), atom->name);
>> +}



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