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

[RFC PATCH] help: add optional instructions for reporting bugs

From
Stefan Beller <sbeller@google.com>
Date
Mar 9, 2017, 19:30 UTC
Message-ID
<20170309193050.19988-1-sbeller@google.com>

Git is distributed in various ways by various organizations. The Git community prefers to have bugs reported on the mailing list, whereas other organizations may rather want to have filed a bug in a bug tracker or such. The point of contact is different by organization as well.

When reporting bugs, users will usually look at the output of 'git --version' at one point to write a quality bug report. So that is a good spot to provide additional information to the user about e.g. additional the organizational quirks how to report a bug.

As the output of 'git --version' is parsed by scripts as well, we only want to present this information to users, which is why we only give the output to TTYs.

Signed-off-by: Stefan Beller <sbeller@google.com>
---
Not sure if this is a good idea at all, hence RFC.

Thanks, Stefan

 help.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/help.c b/help.c
index bc6cd19cf3..d4c1fbe5cb 100644
--- a/help.c
+++ b/help.c
@@ -9,6 +9,12 @@
 #include "version.h"
 #include "refs.h"
 
+#ifdef GIT_BUG_REPORT_HELP
+const char git_bug_reporting_string[] = GIT_BUG_REPORT_HELP;
+#else
+const char git_bug_reporting_string[] = "To report bugs send a plain text email to git@vger.kernel.org";
+#endif
+
 void add_cmdname(struct cmdnames *cmds, const char *name, int len)
 {
 	struct cmdname *ent;
@@ -435,6 +441,8 @@ int cmd_version(int argc, const char **argv, const char *prefix)
 			/* NEEDSWORK: also save and output GIT-BUILD_OPTIONS? */
 		}
 	}
+	if (isatty(1))
+		puts(git_bug_reporting_string);
 	return 0;
 }
 
-- 
2.12.0.190.g6e60aba09d.dirty
Next: Jonathan Nieder
Message 1 of 5 in “help: add optional instructions for reporting bugs”
  1. help: add optional instructions for reporting bugsStefan Beller, Mar 9, 2017
  2. Jonathan NiederMar 10, 2017
  3. Christian CouderMar 10, 2017
  4. Jeff KingMar 12, 2017
  5. Stefan BellerMar 13, 2017

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.