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
Junio C Hamano <gitster@pobox.com>
Date
Apr 16, 2013, 22:35 UTC
Message-ID
<7vvc7mhzok.fsf@alter.siamese.dyndns.org>
In-Reply-To
<3D6BDB8830FC44A38B1AC508488049C0@PhilipOakley>
"Philip Oakley" <philipoakley@iee.org> writes:
Show 10 quoted lines
>> 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?
> ...
>>  printf("git version %s\n", git_version_string);

It is fairly clear from the commented code that the only guarantee they will be getting is that it begins with a string "git version ". git_version_string[] has anything of the builder's choice. I am not sure if there anything more to "indicate".

Really, if you run
	$ git version

and you get "Git Source Code Management Version 3.56" from its output, it is likely that the version is very different from what you know, and you should not assume any your assumption would hold.

> Or mention "such as git gui"?

I do not see what it would buy us. It is not like it is OK as long as we upadte Git gui at the same time.

Previous: Philip OakleyNext: Philip Oakley
Message 4 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.