From 3c3fbcdb66b3ae4d98d9a020a833fd2dfce4249b Mon Sep 17 00:00:00 2001 From: William Martin Date: Thu, 19 Oct 2023 12:35:43 +0200 Subject: [PATCH] Remove Login branch that handles empty username --- internal/config/config.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index 65240aa3f..faa6497e6 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -229,11 +229,9 @@ func (c *AuthConfig) Login(hostname, username, token, gitProtocol string, secure c.cfg.Set([]string{hosts, hostname, oauthToken}, token) insecureStorageUsed = true } - // TODO: I can't find anywhere that calls this function without a username, so that would seem like - // something we might want to error on? - if username != "" { - c.cfg.Set([]string{hosts, hostname, "user"}, username) - } + + c.cfg.Set([]string{hosts, hostname, "user"}, username) + if gitProtocol != "" { c.cfg.Set([]string{hosts, hostname, "git_protocol"}, gitProtocol) }