diff options
author | Mike Frysinger <vapier@google.com> | 2019-07-10 15:45:49 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2019-07-11 01:32:38 +0000 |
commit | 242fcdd93b461263a1322093d432427736cf7e41 (patch) | |
tree | 53622d4bf4c3aeff1fd63087388a5245b2ba464e /main.py | |
parent | ca540aed19bb89a4cd71de83ba123338e1e721f6 (diff) | |
download | git-repo-242fcdd93b461263a1322093d432427736cf7e41.tar.gz |
main: user-agent: include full git version info
We've been truncating the git version info in the user agent to the
first three components. So given an example `git --version` like
"2.22.0.510.g264f2c817a-goog", we were cutting it down to "2.22.0".
For user-agent purposes, we usually want that full string, so use
the original full value instead.
Bug: https://crbug.com/gerrit/11144
Change-Id: I8ffe3186bdaac96164c34ac835a54bb3fc85527e
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/231056
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -317,7 +317,7 @@ def _UserAgent(): | |||
317 | _user_agent = 'git-repo/%s (%s) git/%s Python/%d.%d.%d' % ( | 317 | _user_agent = 'git-repo/%s (%s) git/%s Python/%d.%d.%d' % ( |
318 | repo_version, | 318 | repo_version, |
319 | os_name, | 319 | os_name, |
320 | '.'.join(map(str, git.version_tuple())), | 320 | git.version_tuple().full, |
321 | py_version[0], py_version[1], py_version[2]) | 321 | py_version[0], py_version[1], py_version[2]) |
322 | return _user_agent | 322 | return _user_agent |
323 | 323 | ||