diff options
author | Jeff King <peff@peff.net> | 2019-03-20 11:16:42 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-03-20 12:34:09 +0300 |
commit | 9a1180fc304ad9831641e5788e9c8d3dfc10ccdd (patch) | |
tree | 3fe0b620ad3a050a7eb8f47dd92041da8d4b3106 | |
parent | da55ff3d84b9edc635aba4a986de25ec219acd7a (diff) |
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>
-rw-r--r-- | pretty.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -988,8 +988,7 @@ static size_t parse_color(struct strbuf *sb, /* in UTF-8 */ return rest - placeholder; } -static size_t parse_padding_placeholder(struct strbuf *sb, - const char *placeholder, +static size_t parse_padding_placeholder(const char *placeholder, struct format_commit_context *c) { const char *ch = placeholder; @@ -1194,7 +1193,7 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */ case '<': case '>': - return parse_padding_placeholder(sb, placeholder, c); + return parse_padding_placeholder(placeholder, c); } /* these depend on the commit */ |