git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Karthik NayakNext: Smaran Jaianand
Message 4 of 7 in “bugreport: clarify usage message purpose”
  1. bugreport: clarify usage message purposeSmaran Jaianand, Mar 30, 2026
  2. bugreport: clarify usage message purposeSmaran Jaianand, Mar 30, 2026
  3. Karthik NayakMar 30, 2026
  4. Junio C HamanoMar 30, 2026
  5. bugreport: revert incorrect usage message changeSmaran Jaianand, Mar 30, 2026
  6. bugreport: revert incorrect usage message changeSmaran Jaianand, Mar 30, 2026
  7. Junio C HamanoMar 30, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.