pretty: drop unused strbuf from parse_padding_placeholder()

Unlike other parts of the --pretty user-format expansion,
this function is not actually writing to the output, but
instead just storing the padding values into a context
struct. We don't need to be passed a strbuf at all.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2019-03-20 04:16:42 -04:00 committed by Junio C Hamano
parent da55ff3d84
commit 9a1180fc30

View File

@ -988,8 +988,7 @@ static size_t parse_color(struct strbuf *sb, /* in UTF-8 */
return rest - placeholder; return rest - placeholder;
} }
static size_t parse_padding_placeholder(struct strbuf *sb, static size_t parse_padding_placeholder(const char *placeholder,
const char *placeholder,
struct format_commit_context *c) struct format_commit_context *c)
{ {
const char *ch = placeholder; const char *ch = placeholder;
@ -1194,7 +1193,7 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
case '<': case '<':
case '>': case '>':
return parse_padding_placeholder(sb, placeholder, c); return parse_padding_placeholder(placeholder, c);
} }
/* these depend on the commit */ /* these depend on the commit */