Remove Login branch that handles empty username

This commit is contained in:
William Martin 2023-10-19 12:35:43 +02:00
parent aa8848471f
commit 3c3fbcdb66

View file

@ -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)
}