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

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

From
Philip Oakley <philipoakley@iee.org>
Date
Apr 16, 2013, 21:59 UTC
Message-ID
<3D6BDB8830FC44A38B1AC508488049C0@PhilipOakley>
In-Reply-To
<1366144405-61438-1-git-send-email-davvid@gmail.com>
From: "David Aguilar" <davvid@gmail.com>
Sent: Tuesday, April 16, 2013 9:33 PM
Show 20 quoted lines
> 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".

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

Show 19 quoted lines
> + */
>  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@vger.kernel.org
> 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
> 
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 7 in “help.c: add a compatibility comment to cmd_version()”
  1. help.c: add a compatibility comment to cmd_version()David Aguilar, Apr 16, 2013
  2. Junio C HamanoApr 16, 2013
  3. Philip OakleyApr 16, 2013
  4. Junio C HamanoApr 16, 2013
  5. Philip OakleyApr 17, 2013
  6. Junio C HamanoApr 18, 2013
  7. Philip OakleyApr 18, 2013

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.