Thread (1 message) 1 message, 1 author, 2018-11-05

Re: [PATCH v2 5/5] pretty: add support for separator option in %(trailers)

From: Junio C Hamano <hidden>
Date: 2018-11-05 05:18:11

Anders Waldenborg [off-list ref] writes:
+				if (opts->separator && first_printed)
+					strbuf_addbuf(out, opts->separator);
 				if (opts->no_key)
-					strbuf_addf(out, "%s\n", val.buf);
+					strbuf_addf(out, "%s", val.buf);
Avoid addf with "%s" alone as a formatter; instead say

	strbuf_addstr(out, val.buf);

cf. contrib/coccinelle/strbuf.cocci
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help