Subject: Re: [GSoC PATCH] bugreport: clarify usage message purpose

From: Junio C Hamano <[email-masked]>
Date: Mon, 30 Mar 2026 07:56:54 -0700

Smaran Jaianand <[email-masked]> writes:

> From: smaran-jaianand <[email-masked]>
>
> Add a brief description of the bugreport command to improve
> clarity of the usage message.
>
> Signed-off-by: smaran-jaianand <[email-masked]>
> ---
>  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.0

This 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).