From: Junio C Hamano <gitster@pobox.com>
To: David Aguilar <davvid@gmail.com>
Cc: git@vger.kernel.org, Philip Oakley <philipoakley@iee.org>
Subject: Re: [PATCH] help.c: add a compatibility comment to cmd_version()
Date: Tue, 16 Apr 2013 13:46:10 -0700 [thread overview]
Message-ID: <7vsj2qjjal.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1366144405-61438-1-git-send-email-davvid@gmail.com> (David Aguilar's message of "Tue, 16 Apr 2013 13:33:25 -0700")
David Aguilar <davvid@gmail.com> writes:
> 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;
> }
Will queue; thanks.
next prev parent reply other threads:[~2013-04-16 20:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vsj2qjjal.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=philipoakley@iee.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).