We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
2 parents 24dab3a + 87a7c37 commit 5ae9cc4Copy full SHA for 5ae9cc4
modules/ssh/ssh.go
@@ -78,8 +78,7 @@ func sessionHandler(session ssh.Session) {
78
gitProtocol := ""
79
for _, env := range session.Environ() {
80
if strings.HasPrefix(env, "GIT_PROTOCOL=") {
81
- // The value would be version=2, so using normal split doesn't work here.
82
- gitProtocol = strings.SplitN(env, "=", 2)[1]
+ _, gitProtocol, _ = strings.Cut(env, "=")
83
break
84
}
85
0 commit comments