Nguyễn Thái Ngọc Duy [off-list ref] 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.