diff options
Diffstat (limited to 'pretty.c')
-rw-r--r-- | pretty.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1873,14 +1873,13 @@ static size_t format_commit_item(struct strbuf *sb, /* in UTF-8 */ void userformat_find_requirements(const char *fmt, struct userformat_want *w) { - struct strbuf dummy = STRBUF_INIT; - if (!fmt) { if (!user_format) return; fmt = user_format; } - while (strbuf_expand_step(&dummy, &fmt)) { + while ((fmt = strchr(fmt, '%'))) { + fmt++; if (skip_prefix(fmt, "%", &fmt)) continue; @@ -1900,7 +1899,6 @@ void userformat_find_requirements(const char *fmt, struct userformat_want *w) break; } } - strbuf_release(&dummy); } void repo_format_commit_message(struct repository *r, |