Re: git version statistics
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 31, 2012, 19:35 UTC
- Message-ID
- <7v396g6t53.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120531120018.GA24986@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
> diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c > index 149db88..f3b8422 100644 > --- a/builtin/fetch-pack.c > +++ b/builtin/fetch-pack.c > @@ -327,6 +327,7 @@ static int find_common(int fd[2], unsigned char *result_sha1, > if (args.no_progress) strbuf_addstr(&c, " no-progress"); > if (args.include_tag) strbuf_addstr(&c, " include-tag"); > if (prefer_ofs_delta) strbuf_addstr(&c, " ofs-delta"); > + strbuf_addf(&c, " agent=git/%s", git_version_string); > packet_buf_write(&req_buf, "want %s%s\n", remote_hex, c.buf); > strbuf_release(&c);
Even though the version string GIT-VERSION-GEN script deduces from the repository version is designed to be safe, in general "version" file can contain a string with whitespaces. You may want to be careful about that in the above.
Do we want a similar identifier string on the other side of the connection?