summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2023-06-17 20:44:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-06-18 19:55:30 (GMT)
commit4416b86c6b34dad64b556bb1eb6711d5e6595a48 (patch)
treed8eae1b68c8afc7556cf2506789e255d4c9817ab /pretty.c
parent6f1e2d52797161c7effe4d1388765de3dbd80bbf (diff)
downloadgit-4416b86c6b34dad64b556bb1eb6711d5e6595a48.zip
git-4416b86c6b34dad64b556bb1eb6711d5e6595a48.tar.gz
git-4416b86c6b34dad64b556bb1eb6711d5e6595a48.tar.bz2
strbuf: simplify strbuf_expand_literal_cb()
Now that strbuf_expand_literal_cb() is no longer used as a callback, drop its "_cb" name suffix and unused context parameter. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pretty.c b/pretty.c
index cffbf32..4c08f98 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1262,7 +1262,7 @@ static struct strbuf *expand_separator(struct strbuf *sb,
if (skip_prefix(format, "%", &format))
strbuf_addch(sb, '%');
- else if ((len = strbuf_expand_literal_cb(sb, format, NULL)))
+ else if ((len = strbuf_expand_literal(sb, format)))
format += len;
else
strbuf_addch(sb, '%');
@@ -1395,7 +1395,7 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
char **slot;
/* these are independent of the commit */
- res = strbuf_expand_literal_cb(sb, placeholder, NULL);
+ res = strbuf_expand_literal(sb, placeholder);
if (res)
return res;