Commit 8dd81ea2 authored by tandrii's avatar tandrii Committed by Commit bot

Revert of Gerrit git cl: allow overriding GERRIT_SQUASH_UPLOADS in git config....

Revert of Gerrit git cl: allow overriding GERRIT_SQUASH_UPLOADS in git config. (patchset #2 id:20001 of https://codereview.chromium.org/2070013002/ )

Reason for revert:
I suspect this broke squash setting setup.

Original issue's description:
> Gerrit git cl: allow overriding GERRIT_SQUASH_UPLOADS in git config.
>
> Previously, if GERRIT_SQUASH_UPLOADS was found in codereview.settings,
> a local repository value of gerrit.squash-uploads would be set.
>
> This CL changes that, so that gerrit.squash-uploads property is written
> with GERRIT_SQUASH_UPLOADS value ONLY IF the property wasn't set before.
>
> This allows individual users to choose their own way with
>   git config [--global] -bool gerrit.squash-uploads (true|false)
>
> BUG=611892
> R=andybons@chromium.org,sergiyb@chromium.org
>
> Committed: https://chromium.googlesource.com/chromium/tools/depot_tools/+/768ec9a75560b5e5903d86654d4c1ab2afe17361

TBR=andybons@chromium.org,sergiyb@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=611892

Review-Url: https://codereview.chromium.org/2071963002
parent 2cc483c1
......@@ -2834,10 +2834,8 @@ def LoadCodereviewSettingsFromFile(fileobj):
RunGit(['config', 'gerrit.host', keyvals['GERRIT_HOST']])
if 'GERRIT_SQUASH_UPLOADS' in keyvals:
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']])
RunGit(['config', 'gerrit.squash-uploads',
keyvals['GERRIT_SQUASH_UPLOADS']])
if 'GERRIT_SKIP_ENSURE_AUTHENTICATED' in keyvals:
RunGit(['config', 'gerrit.skip-ensure-authenticated',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment