aboutsummaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorMirko Faina <mroik@delayed.space>2026-03-23 17:57:28 +0100
committerJunio C Hamano <gitster@pobox.com>2026-03-23 13:06:58 -0700
commit60cb27ed6575daafe86938fa5fcf3778fc4876f2 (patch)
tree56c85ade84ca5207043db09773dea386f28937c8 /pretty.c
parentb3c222ed9103db7947b432a99d460e22bdc873ca (diff)
downloadgit-60cb27ed6575daafe86938fa5fcf3778fc4876f2.tar.xz
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>
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 74673714c8..814803980b 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1551,7 +1551,7 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
if (starts_with(placeholder, "(count)")) {
if (!c->pretty_ctx->rev)
- die(_("this format specifier can't be used with this command"));
+ die(_("%s is not supported by this command"), "%(count)");
strbuf_addf(sb, "%0*d", decimal_width(c->pretty_ctx->rev->total),
c->pretty_ctx->rev->nr);
return 7;
@@ -1559,7 +1559,7 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
if (starts_with(placeholder, "(total)")) {
if (!c->pretty_ctx->rev)
- die(_("this format specifier can't be used with this command"));
+ die(_("%s is not supported by this command"), "%(total)");
strbuf_addf(sb, "%d", c->pretty_ctx->rev->total);
return 7;
}