[git_auth] Auto configure global config also

Bug: b/351071334
Change-Id: I069443a74cf7e33ce9ebea53ea3d52e272ed3570
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5740605
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
changes/05/5740605/18
Allen Li 1 year ago committed by LUCI CQ
parent b0024901d3
commit 7815620b1f

@ -243,7 +243,7 @@ def AutoConfigure(cwd: str, cl: git_cl.Changelist) -> None:
logging.debug(
'Automatically configuring Git repo authentication'
' (current version: %r, latest: %r)', v, latestVer)
ConfigureRepo(cwd, cl)
Configure(cwd, cl)
scm.GIT.SetConfig(cwd, 'depot-tools.gitAuthAutoConfigured',
str(latestVer))
@ -278,13 +278,6 @@ def Configure(cwd: str, cl: git_cl.Changelist) -> None:
c2.apply(cwd)
def ConfigureRepo(cwd: str, cl: git_cl.Changelist) -> None:
"""Configure the current Git repo authentication."""
logging.debug('Configuring current Git repo authentication...')
c = ConfigChanger.new_from_env(cwd, cl)
c.apply(cwd)
def ClearRepoConfig(cwd: str, cl: git_cl.Changelist) -> None:
"""Clear the current Git repo authentication."""
logging.debug('Clearing current Git repo authentication...')

Loading…
Cancel
Save