diff --git a/git_cl.py b/git_cl.py index b01b7dbbc..767c5a885 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2835,8 +2835,10 @@ def LoadCodereviewSettingsFromFile(fileobj): RunGit(['config', 'gerrit.host', keyvals['GERRIT_HOST']]) if 'GERRIT_SQUASH_UPLOADS' in keyvals: - RunGit(['config', 'gerrit.squash-uploads', - keyvals['GERRIT_SQUASH_UPLOADS']]) + cur = RunGit(['config', '--bool', 'gerrit.squash-uploads'], error_ok=True) + if not cur: # Set the value only if it wasn't set by the user manually. + RunGit(['config', 'gerrit.squash-uploads', + keyvals['GERRIT_SQUASH_UPLOADS']]) if 'GERRIT_SKIP_ENSURE_AUTHENTICATED' in keyvals: RunGit(['config', 'gerrit.skip-ensure-authenticated',