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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "David Aguilar" <davvid@xxxxxxxxx>
Sent: Tuesday, April 16, 2013 9:33 PM
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@xxxxxxxxx>
---
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".

Shouldn't the expected format of our known external project also be indicated?
Or mention "such as git gui"?

+ */
 printf("git version %s\n", git_version_string);
 return 0;
}
--
1.8.2.1.652.ge104b5e

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3272 / Virus Database: 3162/6248 - Release Date: 04/16/13


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]