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....@gmail.com>
> ---
> 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

> +             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);
> +}
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to