Commit f2de0b97 authored by David Aguilar's avatar David Aguilar Committed by Junio C Hamano

help.c: add a compatibility comment to cmd_version()

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's avatarDavid Aguilar <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent a46221e9
......@@ -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;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment