From 242fcdd93b461263a1322093d432427736cf7e41 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 10 Jul 2019 15:45:49 -0400 Subject: [PATCH] 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 Tested-by: Mike Frysinger --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 531400c5..54817776 100755 --- a/main.py +++ b/main.py @@ -317,7 +317,7 @@ def _UserAgent(): _user_agent = 'git-repo/%s (%s) git/%s Python/%d.%d.%d' % ( repo_version, os_name, - '.'.join(map(str, git.version_tuple())), + git.version_tuple().full, py_version[0], py_version[1], py_version[2]) return _user_agent