aboutsummaryrefslogtreecommitdiffstats
path: root/usage.c
diff options
context:
space:
mode:
Diffstat (limited to 'usage.c')
-rw-r--r--usage.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/usage.c b/usage.c
index 35dc57eb07..7545a61645 100644
--- a/usage.c
+++ b/usage.c
@@ -376,7 +376,8 @@ void bug_fl(const char *file, int line, const char *fmt, ...)
va_end(ap);
}
-NORETURN void you_still_use_that(const char *command_name)
+
+NORETURN void you_still_use_that(const char *command_name, const char *hint)
{
struct strbuf percent_encoded = STRBUF_INIT;
strbuf_add_percentencode(&percent_encoded,
@@ -384,8 +385,13 @@ NORETURN void you_still_use_that(const char *command_name)
STRBUF_ENCODE_SLASH);
fprintf(stderr,
- _("'%s' is nominated for removal.\n"
- "If you still use this command, here's what you can do:\n"
+ _("'%s' is nominated for removal.\n"), command_name);
+
+ if (hint)
+ fputs(hint, stderr);
+
+ fprintf(stderr,
+ _("If you still use this command, here's what you can do:\n"
"\n"
"- read https://git-scm.com/docs/BreakingChanges.html\n"
"- check if anyone has discussed this on the mailing\n"
@@ -395,7 +401,7 @@ NORETURN void you_still_use_that(const char *command_name)
" know that you still use this command and were unable\n"
" to determine a suitable replacement\n"
"\n"),
- command_name, percent_encoded.buf);
+ percent_encoded.buf);
strbuf_release(&percent_encoded);
die(_("refusing to run without --i-still-use-this"));
}