Re: git version statistics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> 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?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]