mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
[git_cl] Apply OLD_AUTH if new auth flag is off
Note that this logic still isn't run yet, because we only call ConfigureGitRepoAuth behind new auth flag checks. Bug: b/351024645 Change-Id: Idca4d1ce3ebd3f2c673f244f85b3cae6da39f8e5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5699188 Reviewed-by: Yiwei Zhang <yiwzhang@google.com> Commit-Queue: Allen Li <ayatane@chromium.org>
This commit is contained in:
@@ -3737,6 +3737,8 @@ class GitAuthConfigChanger(object):
|
||||
@staticmethod
|
||||
def _infer_mode() -> GitConfigMode:
|
||||
"""Infer default mode to use."""
|
||||
if not newauth.Enabled():
|
||||
return GitConfigMode.OLD_AUTH
|
||||
if gerrit_util.ShouldUseSSO(gerrit_host):
|
||||
return GitConfigMode.NEW_AUTH_SSO
|
||||
return GitConfigMode.NEW_AUTH
|
||||
|
||||
Reference in New Issue
Block a user