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>
Jeff King committed
Mar 20, 2019 at 04:16 UTC
9a1180fc304ad9831641e5788e9c8d3dfc10ccdd
1 file changed
+2
-3
pretty.c
+2
-3
@@ -988,8 +988,7 @@ static size_t parse_color(struct strbuf *sb, /* in UTF-8 */
988
return rest - placeholder;
989
}
990
991
-static size_t parse_padding_placeholder(struct strbuf *sb,
992
- const char *placeholder,
991
+static size_t parse_padding_placeholder(const char *placeholder,
992
struct format_commit_context *c)
993
{
994
const char *ch = placeholder;
@@ -1194,7 +1193,7 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
1193
1194
case '<':
1195
case '>':
1197
- return parse_padding_placeholder(sb, placeholder, c);
1196
+ return parse_padding_placeholder(placeholder, c);
1197
}
1198
1199
/* these depend on the commit */