]> git.ipfire.org Git - thirdparty/git.git/commitdiff
pretty: drop unused strbuf from parse_padding_placeholder()
authorJeff King <peff@peff.net>
Wed, 20 Mar 2019 08:16:42 +0000 (04:16 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 Mar 2019 09:34:09 +0000 (18:34 +0900)
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>
pretty.c

index f925a014f97a98a941001ee5ae41f117bf58d6dd..ced0485257d3190f0c3ad8b89f15fa47c8660fad 100644 (file)
--- a/pretty.c
+++ b/pretty.c
@@ -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 */