Re: [PATCH 1/4] usage: help the user help themselves
- From
Kristoffer Haugsbakk <code@khaugsbakk.name>
- Date
- Aug 27, 2025, 20:36 UTC
- Message-ID
- <9611573e-fb0b-49d5-933a-50d8e0603701@app.fastmail.com>
- In-Reply-To
- <e81023edb2d78d2be0ecffc071f2c5316b0c7a32.1756311355.git.code@khaugsbakk.name>
> usage: help the user help themselves
I think I’ll change the area to the more pointed:
you-still-use-that??:
On Wed, Aug 27, 2025, at 18:29, kristofferhaugsbakk@fastmail.com wrote:
Show 23 quoted lines
> @@ -377,12 +378,22 @@ void bug_fl(const char *file, int line, const char *fmt, ...)
>
> NORETURN void you_still_use_that(const char *command_name)
> {
> + struct strbuf percent_encoded = STRBUF_INIT;
> + strbuf_add_percentencode(&percent_encoded,
> + command_name,
> + STRBUF_ENCODE_SLASH);
> +
> fprintf(stderr,
> _("'%s' is nominated for removal.\n"
> - "If you still use this command, please add an extra\n"
> - "option, '--i-still-use-this', on the command line\n"
> - "and let us know you still use it by sending an e-mail\n"
> - "to <git@vger.kernel.org>. Thanks.\n"),
> - command_name);
> + "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"
> + " list and if they came up with something that can\n"
> + " help you: https://lore.kernel.org/git/?q=%s\n"
> + "- send an email to <git@vger.kernel.org>\n"Maybe (thinking out loud) this should retain some part of the “let us know you still use this” spirit:
- send an email to <git@vger.kernel.org> and let us know
that you still use this commandShow 7 quoted lines
> + "\n"),
> + command_name, percent_encoded.buf);
> + strbuf_release(&percent_encoded);
> die(_("refusing to run without --i-still-use-this"));
> }
> --
> 2.51.0.11.g23cedd8a747