Nguyễn Thái Ngọc Duy  <pclo...@gmail.com> writes:

> This makes it easier to change the formatting later. And it makes sure
> translators cannot mess up format specifiers and break Git.
> ...
> +static void format_display(struct strbuf *display, char code,
> +                        const char *summary, const char *error,
> +                        const char *remote, const char *local)
> +{
> +     strbuf_addf(display, "%c %-*s ", code, TRANSPORT_SUMMARY(summary));
> +     strbuf_addf(display, "%-*s -> %s", REFCOL_WIDTH, remote, local);
> +     if (error)
> +             strbuf_addf(display, "  (%s)", error);
> +}
> +

Nice reduction of the code repetition below.  Looks very sensible.
--
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