From 00dbccdcefdc75bf1d1b7467e27f224e8885562f Mon Sep 17 00:00:00 2001 From: "shinyak@chromium.org" Date: Fri, 15 Apr 2016 07:24:43 +0000 Subject: [PATCH] Use hyphen for gerrit.skip-ensure-authenticated git config key should consist of alphanumeric characters and '-'. The underscore '_' is not allowed. So we're getting 'invalid key' error when GERRIT_SKIP_ENSURE_AUTHENTICATED is set. Let's use '-' instead of '_'. BUG=603378 Review URL: https://codereview.chromium.org/1882833005 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299952 0039d316-1c4b-4281-b951-d872f2087c98 --- git_cl.py | 4 ++-- tests/git_cl_test.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/git_cl.py b/git_cl.py index eb66039a7..cf1e2c910 100755 --- a/git_cl.py +++ b/git_cl.py @@ -777,7 +777,7 @@ class Settings(object): uploads.""" if self.gerrit_skip_ensure_authenticated is None: self.gerrit_skip_ensure_authenticated = ( - RunGit(['config', '--bool', 'gerrit.skip_ensure_authenticated'], + RunGit(['config', '--bool', 'gerrit.skip-ensure-authenticated'], error_ok=True).strip() == 'true') return self.gerrit_skip_ensure_authenticated @@ -2732,7 +2732,7 @@ def LoadCodereviewSettingsFromFile(fileobj): keyvals['GERRIT_SQUASH_UPLOADS']]) if 'GERRIT_SKIP_ENSURE_AUTHENTICATED' in keyvals: - RunGit(['config', 'gerrit.skip_ensure_authenticated', + RunGit(['config', 'gerrit.skip-ensure-authenticated', keyvals['GERRIT_SKIP_ENSURE_AUTHENTICATED']]) if 'PUSH_URL_CONFIG' in keyvals and 'ORIGIN_URL_CONFIG' in keyvals: diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py index ed24c84ca..a78c7383c 100755 --- a/tests/git_cl_test.py +++ b/tests/git_cl_test.py @@ -680,7 +680,7 @@ class TestGitCl(TestCase): @classmethod def _gerrit_ensure_auth_calls(cls, issue=None, skip_auth_check=False): - cmd = ['git', 'config', '--bool', 'gerrit.skip_ensure_authenticated'] + cmd = ['git', 'config', '--bool', 'gerrit.skip-ensure-authenticated'] if skip_auth_check: return [((cmd, ), 'true')]