git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] help.c: add a compatibility comment to cmd_version()
@ 2013-04-16 20:33 David Aguilar
  2013-04-16 20:46 ` Junio C Hamano
  2013-04-16 21:59 ` Philip Oakley
  0 siblings, 2 replies; 7+ messages in thread
From: David Aguilar @ 2013-04-16 20:33 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Philip Oakley

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 <davvid@gmail.com>
---
 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;
 }
-- 
1.8.2.1.652.ge104b5e

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-04-18 23:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-16 20:33 [PATCH] help.c: add a compatibility comment to cmd_version() David Aguilar
2013-04-16 20:46 ` Junio C Hamano
2013-04-16 21:59 ` Philip Oakley
2013-04-16 22:35   ` Junio C Hamano
2013-04-17 23:03     ` Philip Oakley
2013-04-18  0:13       ` Junio C Hamano
2013-04-18 23:00         ` Philip Oakley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).