Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: git_cl.py

Issue 2070013002: Gerrit git cl: allow overriding GERRIT_SQUASH_UPLOADS in git config. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: review Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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',
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698