diff --git a/git_auth.py b/git_auth.py index e7b00f3a1..e17b66fd3 100644 --- a/git_auth.py +++ b/git_auth.py @@ -223,7 +223,7 @@ class ConfigChanger(object): self._set_config_func(*args, **kwargs) -def ConfigureGitAuth(cwd: str, cl: git_cl.Changelist) -> None: +def Configure(cwd: str, cl: git_cl.Changelist) -> None: """Configure Git authentication. This may modify the global Git config and the local repo config as @@ -253,14 +253,14 @@ def ConfigureGitAuth(cwd: str, cl: git_cl.Changelist) -> None: c2.apply(cwd) -def ConfigureGitRepoAuth(cwd: str, cl: git_cl.Changelist) -> None: +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 ClearGitRepoAuth(cwd: str, cl: git_cl.Changelist) -> None: +def ClearRepoConfig(cwd: str, cl: git_cl.Changelist) -> None: """Clear the current Git repo authentication.""" logging.debug('Clearing current Git repo authentication...') c = ConfigChanger.new_from_env(cwd, cl) diff --git a/git_cl.py b/git_cl.py index 590554eaa..036797ab4 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2360,7 +2360,7 @@ class Changelist(object): logging.debug( 'Automatically configuring Git repo authentication (current version: %r, latest: %r)', v, latestVer) - git_auth.ConfigureGitRepoAuth(os.getcwd(), Changelist()) + git_auth.ConfigureRepo(os.getcwd(), Changelist()) scm.GIT.SetConfig(settings.GetRoot(), 'depot-tools.gitAuthAutoConfigured', str(latestVer)) @@ -3892,10 +3892,10 @@ def CMDcreds_check(parser, args): _, _ = parser.parse_args(args) if newauth.Enabled(): - git_auth.ConfigureGitAuth(os.getcwd(), Changelist()) + git_auth.Configure(os.getcwd(), Changelist()) return 0 if newauth.ExplicitlyDisabled(): - git_auth.ClearGitRepoAuth(os.getcwd(), Changelist()) + git_auth.ClearRepoConfig(os.getcwd(), Changelist()) # Code below checks .gitcookies. Abort if using something else. auth_name, _ = gerrit_util.debug_auth()