Re: [PATCH v7 10/17] ref-filter: introduce refname_atom_parser_internal()

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

 



On Sat, Nov 19, 2016 at 3:06 AM, Jakub Narębski <jnareb@xxxxxxxxx> wrote:
> W dniu 08.11.2016 o 21:12, Karthik Nayak pisze:
>> From: Karthik Nayak <karthik.188@xxxxxxxxx>
>>
>> Since there are multiple atoms which print refs ('%(refname)',
>> '%(symref)', '%(push)', '%upstream'), it makes sense to have a common
>
> Minor typo; it should be: "%(upstream)"
>

Will fix that.

>> ground for parsing them. This would allow us to share implementations of
>> the atom modifiers between these atoms.
>>
>> Introduce refname_atom_parser_internal() to act as a common parsing
>> function for ref printing atoms. This would eventually be used to
>> introduce refname_atom_parser() and symref_atom_parser() and also be
>> internally used in remote_ref_atom_parser().
>>
>> Helped-by: Jeff King <peff@xxxxxxxx>
>> Signed-off-by: Karthik Nayak <Karthik.188@xxxxxxxxx>
>> ---
> [...]
>
>> +static void refname_atom_parser_internal(struct refname_atom *atom,
>> +                                      const char *arg, const char *name)
>> +{
>> +     if (!arg)
>> +             atom->option = R_NORMAL;
>> +     else if (!strcmp(arg, "short"))
>> +             atom->option = R_SHORT;
>> +     else if (skip_prefix(arg, "strip=", &arg)) {
>> +             atom->option = R_STRIP;
>> +             if (strtoul_ui(arg, 10, &atom->strip) || atom->strip <= 0)
>> +                     die(_("positive value expected refname:strip=%s"), arg);
>> +     }       else
>           ^^^^^^
>
> It looks like you have spurious tab here.
>

That would have gone unnoticed, thanks for pointing it out.

-- 
Regards,
Karthik Nayak




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