Re: [GSoC PATCH] bugreport: clarify usage message purpose
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 30, 2026, 14:56 UTC
- Message-ID
- <xmqqjyutfjrd.fsf@gitster.g>
- In-Reply-To
- <20260330064454.76833-1-24070721037@sithyd.siu.edu.in>
Smaran Jaianand <24070721037@sithyd.siu.edu.in> writes:
Show 26 quoted lines
> From: smaran-jaianand <24070721037@sithyd.siu.edu.in>
>
> Add a brief description of the bugreport command to improve
> clarity of the usage message.
>
> Signed-off-by: smaran-jaianand <24070721037@sithyd.siu.edu.in>
> ---
> builtin/bugreport.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/builtin/bugreport.c b/builtin/bugreport.c
> index f78c3f2aed..3b3fdd4dfb 100644
> --- a/builtin/bugreport.c
> +++ b/builtin/bugreport.c
> @@ -56,7 +56,8 @@ static void get_populated_hooks(struct strbuf *hook_info, int nongit)
> }
>
> static const char * const bugreport_usage[] = {
> - N_("git bugreport [(-o | --output-directory) <path>]\n"
> + N_("git bugreport -create a bug report with diagnostic information \n"
> + " [(-o | --output-directory) <path>]\n"
> " [(-s | --suffix) <format> | --no-suffix]\n"
> " [--diagnose[=<mode>]]"),
> NULL
> --
> 2.43.0This is wrong. The usage string is to show "usage". Unless your users type
$ git bugreport -create a bug ...
from their command line, the first line that you added does not belong there.
In general, these should match what is in the synopsis section of the manpage (i.e., "git help bugreport" output), and there is even a test to ensure they do not diverge from each other (iirc, t0450).