fix(server): ignore request if it's not a git command

Ayman Bagabas created

Change summary

server/git/ssh.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

server/git/ssh.go 🔗

@@ -76,7 +76,7 @@ func Middleware(repoDir string, gh Hooks) wish.Middleware {
 		return func(s ssh.Session) {
 			func() {
 				cmd := s.Command()
-				if len(cmd) == 2 {
+				if len(cmd) == 2 && strings.HasPrefix(cmd[0], "git") {
 					gc := cmd[0]
 					// repo should be in the form of "repo.git"
 					repo := strings.TrimPrefix(cmd[1], "/")