Skip to content

Commit 60cb27e

Browse files
Mroikgitster
authored andcommitted
pretty.c: better die message %(count) and %(total)
Improve die messages for commands that do not support %(count) and %(total) Signed-off-by: Mirko Faina <mroik@delayed.space> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent b3c222e commit 60cb27e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pretty.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,15 +1551,15 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
15511551

15521552
if (starts_with(placeholder, "(count)")) {
15531553
if (!c->pretty_ctx->rev)
1554-
die(_("this format specifier can't be used with this command"));
1554+
die(_("%s is not supported by this command"), "%(count)");
15551555
strbuf_addf(sb, "%0*d", decimal_width(c->pretty_ctx->rev->total),
15561556
c->pretty_ctx->rev->nr);
15571557
return 7;
15581558
}
15591559

15601560
if (starts_with(placeholder, "(total)")) {
15611561
if (!c->pretty_ctx->rev)
1562-
die(_("this format specifier can't be used with this command"));
1562+
die(_("%s is not supported by this command"), "%(total)");
15631563
strbuf_addf(sb, "%d", c->pretty_ctx->rev->total);
15641564
return 7;
15651565
}

0 commit comments

Comments
 (0)