Skip to content

Commit 9a1180f

Browse files
peffgitster
authored andcommitted
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>
1 parent da55ff3 commit 9a1180f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pretty.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -988,8 +988,7 @@ static size_t parse_color(struct strbuf *sb, /* in UTF-8 */
988988
return rest - placeholder;
989989
}
990990

991-
static size_t parse_padding_placeholder(struct strbuf *sb,
992-
const char *placeholder,
991+
static size_t parse_padding_placeholder(const char *placeholder,
993992
struct format_commit_context *c)
994993
{
995994
const char *ch = placeholder;
@@ -1194,7 +1193,7 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
11941193

11951194
case '<':
11961195
case '>':
1197-
return parse_padding_placeholder(sb, placeholder, c);
1196+
return parse_padding_placeholder(placeholder, c);
11981197
}
11991198

12001199
/* these depend on the commit */

0 commit comments

Comments
 (0)