As part of the work done in #8213 I asked @williammartin to change a handful of places from cfg.GetOrDefault(hostname, "git_protocol") to cfg.Authentication().GitProtocol(hostname). Unfortunately I was incorrect thinking that these two function calls had identical implementations. The GetOrDefault implementation checks the git_protocol key of the hostname, if it does not exist it checks the global git_protocol key, and if that does not exist it returns the default. The GitProtocol implementation checks the git_protocol key of the hostname, and if it does not exist it returns the default. It misses the step of checking the global git_protocol key and We should rectify that.
Since GitProtocol will be required to check the global git_protocol key we should evaluate if the method actually belongs on the AuthConfig struct or in the Config interface.
As part of the work done in #8213 I asked @williammartin to change a handful of places from
cfg.GetOrDefault(hostname, "git_protocol")tocfg.Authentication().GitProtocol(hostname). Unfortunately I was incorrect thinking that these two function calls had identical implementations. TheGetOrDefaultimplementation checks thegit_protocolkey of the hostname, if it does not exist it checks the globalgit_protocolkey, and if that does not exist it returns the default. TheGitProtocolimplementation checks thegit_protocolkey of the hostname, and if it does not exist it returns the default. It misses the step of checking the globalgit_protocolkey and We should rectify that.Since
GitProtocolwill be required to check the globalgit_protocolkey we should evaluate if the method actually belongs on theAuthConfigstruct or in theConfiginterface.