[git_cl] Fix creds_check new auth switch logic pt 2

I got greedy with the first fix, with the assumption that the flag
enablement would not get rolled back.  As it would be easier to not
worry about this logic flip-flopping based on the default flag
flip-flopping.

Spoilers: it did get rolled back, so we end up with the new
creds-check with the newauth flag defaulting to off.  And this causes
a UX problem because new users would get prompted to run creds-check
to set up a gitcookies file, but the new creds-check logic doesn't do
that.

Based on our newfound experience, this should just follow the default
value.  There'll still be some friction whenever we flip-flop the default
value, but that's kind of unavoidable.

Change-Id: I0d81ed4123a8a9bced2fc4300214376cd3f1c9d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6434738
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
changes/38/6434738/3
Allen Li 3 months ago committed by LUCI CQ
parent 8b60ab5798
commit 50e0120582

@ -3902,7 +3902,7 @@ def CMDcreds_check(parser, args):
"""Checks credentials and suggests changes."""
_, _ = parser.parse_args(args)
if not newauth.ExplicitlyDisabled():
if newauth.Enabled():
cl = Changelist()
try:
remote_url = cl.GetRemoteUrl()

Loading…
Cancel
Save