Index: git_cl.py |
diff --git a/git_cl.py b/git_cl.py |
index b01b7dbbc22388231d829f68ff72ce2d42ee81dd..767c5a885a676b1759149054a120e2710c47434e 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', |