From aa8848471f18ab6d40c98cc09136be1c0bbd71bd Mon Sep 17 00:00:00 2001 From: William Martin Date: Thu, 19 Oct 2023 12:33:15 +0200 Subject: [PATCH] Remove Logout branch that handles empty hostname --- internal/config/config.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index d93c37e3c..65240aa3f 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -243,11 +243,6 @@ func (c *AuthConfig) Login(hostname, username, token, gitProtocol string, secure // Logout will remove user, git protocol, and auth token for the given hostname. // It will remove the auth token from the encrypted storage if it exists there. func (c *AuthConfig) Logout(hostname string) error { - // TODO: I can't find anywhere that expects to call this function without a hostname - // and that would seem like a programmer error? - if hostname == "" { - return nil - } _ = c.cfg.Remove([]string{hosts, hostname}) _ = keyring.Delete(keyringServiceName(hostname), "") return ghConfig.Write(c.cfg)