We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
strings.Cut
1 parent 90b2657 commit 87a7c37Copy full SHA for 87a7c37
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