Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] help.c: add a compatibility comment to cmd_version()

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:52

David Aguilar [off-list ref] writes:
quoted hunk
External projects have been known to parse the output of
"git version".  Help prevent future authors from changing
its format by adding a comment to its implementation.

Signed-off-by: David Aguilar <redacted>
---
 help.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/help.c b/help.c
index 1dfa0b0..02ba043 100644
--- a/help.c
+++ b/help.c
@@ -397,6 +397,10 @@ const char *help_unknown_cmd(const char *cmd)
 
 int cmd_version(int argc, const char **argv, const char *prefix)
 {
+	/*
+	 * The format of this string should be kept stable for compatibility
+	 * with external projects that rely on the output of "git version".
+	 */
 	printf("git version %s\n", git_version_string);
 	return 0;
 }
Will queue; thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help