Volume XXII, number 280Wednesday, October 7, 2026Latest message 53 minutes ago

The Git List

News and archive of git@vger.kernel.org, since April 2005

patchbugreport: clarify usage message purpose

7 messages between Mar 30, 2026 and Mar 30, 2026, from Smaran Jaianand, Karthik Nayak, Junio C Hamano.

Plain Markdown or JSON for tools and agents. Diffs are folded; open one to read it.

Smaran JaianandMar 30, 2026, 06:44 UTC on lore
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(-)
Show changes to builtin/bugreport.c +2 −1
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


-- 
* <https://www.facebook.com/symbiosis.official/>*  
<https://www.instagram.com/symbiosis.official/>  
<https://www.linkedin.com/school/symbiosis-international-university/>  
<https://x.com/symbiosistweets> 
 




**Disclaimer:* This email is 
governed by the Disclaimer Terms of SIU, which may be viewed at 
http://siu.edu.in/disclaimer.php <http://siu.edu.in/disclaimer.php>*
Smaran JaianandMar 30, 2026, 06:50 UTC in reply to Smaran Jaianand on lore

[GSoC PATCH v2] bugreport: clarify usage message purpose

From: smaran-jaianand <24070721037@sithyd.siu.edu.in>
v2: Fix spacing in usage message (add missing space and remove trailing whitespace).

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>
Signed-off-by: Smaran Jaianand <24070721037@sithyd.siu.edu.in>
---
 builtin/bugreport.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Show changes to builtin/bugreport.c +2 −1
diff --git a/builtin/bugreport.c b/builtin/bugreport.c
index f78c3f2aed..6b1d1accb1 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


-- 
* <https://www.facebook.com/symbiosis.official/>*  
<https://www.instagram.com/symbiosis.official/>  
<https://www.linkedin.com/school/symbiosis-international-university/>  
<https://x.com/symbiosistweets> 
 




**Disclaimer:* This email is 
governed by the Disclaimer Terms of SIU, which may be viewed at 
http://siu.edu.in/disclaimer.php <http://siu.edu.in/disclaimer.php>*
Karthik NayakMar 30, 2026, 09:32 UTC in reply to Smaran Jaianand on lore

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

Smaran Jaianand <24070721037@sithyd.siu.edu.in> writes:
> From: smaran-jaianand <24070721037@sithyd.siu.edu.in>
>
> v2: Fix spacing in usage message (add missing space and remove
> trailing whitespace).

Version related changes should either go into the cover letter or below the '---' in the commit. I would recommend reading the following documentation

  - Documentation/SubmittingPatches
  - Documentation/CodingGuidelines
  - Documentation/MyFirstContribution.adoc
>
> Add a brief description of the bugreport command to improve
> clarity of the usage message.
>

The git command adds command description to the 'NAME' header within the documentation. For 'git-bugreport(1)' you can find this in 'Documentation/git-bugreport.adoc'.

> Signed-off-by: smaran-jaianand <24070721037@sithyd.siu.edu.in>
> Signed-off-by: Smaran Jaianand <24070721037@sithyd.siu.edu.in>
Show 35 quoted lines
> ---
>  builtin/bugreport.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/builtin/bugreport.c b/builtin/bugreport.c
> index f78c3f2aed..6b1d1accb1 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
>
>
> --
> * <https://www.facebook.com/symbiosis.official/>*
> <https://www.instagram.com/symbiosis.official/>
> <https://www.linkedin.com/school/symbiosis-international-university/>
> <https://x.com/symbiosistweets>
>
>
>
>
>
> **Disclaimer:* This email is
> governed by the Disclaimer Terms of SIU, which may be viewed at
> http://siu.edu.in/disclaimer.php <http://siu.edu.in/disclaimer.php>*
Junio C HamanoMar 30, 2026, 14:56 UTC in reply to Smaran Jaianand on lore

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

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

Smaran JaianandMar 30, 2026, 17:41 UTC in reply to Smaran Jaianand on lore

[GSoC PATCH v3] bugreport: revert incorrect usage message change

From: smaran-jaianand <24070721037@sithyd.siu.edu.in>

The usage string is intended to reflect command syntax rather than describe functionality. Revert the previous change to keep it consistent with documentation.

Signed-off-by: Smaran Jaianand <24070721037@sithyd.siu.edu.in>
---
v3: Revert previous change after feedback that usage strings should reflect command syntax rather than description.
 builtin/bugreport.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Show changes to builtin/bugreport.c +2 −1
diff --git a/builtin/bugreport.c b/builtin/bugreport.c
index f78c3f2aed..6b1d1accb1 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


-- 
* <https://www.facebook.com/symbiosis.official/>*  
<https://www.instagram.com/symbiosis.official/>  
<https://www.linkedin.com/school/symbiosis-international-university/>  
<https://x.com/symbiosistweets> 
 




**Disclaimer:* This email is 
governed by the Disclaimer Terms of SIU, which may be viewed at 
http://siu.edu.in/disclaimer.php <http://siu.edu.in/disclaimer.php>*
Smaran JaianandMar 30, 2026, 17:41 UTC in reply to Smaran Jaianand on lore

[GSoC PATCH v3] bugreport: revert incorrect usage message change

Revert the previous change to keep it consistent with documentation. Based on the feedback, the usage string is intended to represent command syntax rather than provide a description.

Signed-off-by: Smaran Jaianand <24070721037@sithyd.siu.edu.in>
---
 builtin/bugreport.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Show changes to builtin/bugreport.c +1 −2
diff --git a/builtin/bugreport.c b/builtin/bugreport.c
index 6b1d1accb1..c42b61cc8f 100644
--- a/builtin/bugreport.c
+++ b/builtin/bugreport.c
@@ -56,8 +56,7 @@ static void get_populated_hooks(struct strbuf *hook_info, int nongit)
 }
 
 static const char * const bugreport_usage[] = {
-	N_("git bugreport - create a bug report with diagnostic information\n"
-           "              [(-o | --output-directory) <path>]\n"
+	N_("              [(-o | --output-directory) <path>]\n"
 	   "              [(-s | --suffix) <format> | --no-suffix]\n"
 	   "              [--diagnose[=<mode>]]"),
 	NULL
-- 
2.43.0


-- 
* <https://www.facebook.com/symbiosis.official/>*  
<https://www.instagram.com/symbiosis.official/>  
<https://www.linkedin.com/school/symbiosis-international-university/>  
<https://x.com/symbiosistweets> 
 




**Disclaimer:* This email is 
governed by the Disclaimer Terms of SIU, which may be viewed at 
http://siu.edu.in/disclaimer.php <http://siu.edu.in/disclaimer.php>*
Junio C HamanoMar 30, 2026, 20:08 UTC in reply to Smaran Jaianand on lore

Re: [GSoC PATCH v3] bugreport: revert incorrect usage message change

Smaran Jaianand <24070721037@sithyd.siu.edu.in> writes:
> Revert the previous change to keep it consistent with documentation.
> Based on the feedback, the usage string is intended to represent command syntax rather than provide a description.

You really do not have to post a patch to revert something that was rejected and did not get applied anywhere to our tree.

We frown upon a patch series that makes mistakes in an earlier step, only to fix them in a later step. The "git rebase -i" command helps us pretend to be more perfect developers than we actually are, whipping your patch series into a shape that builds one small step on top of another in a logical succession. Such a patch series is easier to understand than a history that faithfully records all the stumbles the developer made until they reached the final solution.

If you rebuilt your changes, while removing any parts that shouldn't be there, in an effort to pretend to be a more perfect developer, sometimes you might end up with an empty patch, and that is OK. You can just send a message that you are retracting the earlier patch and everybody would understand.

Thanks.

Back to recent threads