()
| 33 | } |
| 34 | |
| 35 | func registerManagedSSH() error { |
| 36 | globalRegisteredSmartTransports.Lock() |
| 37 | defer globalRegisteredSmartTransports.Unlock() |
| 38 | |
| 39 | for _, protocol := range []string{"ssh", "ssh+git", "git+ssh"} { |
| 40 | if _, ok := globalRegisteredSmartTransports.transports[protocol]; ok { |
| 41 | continue |
| 42 | } |
| 43 | managed, err := newRegisteredSmartTransport(protocol, false, sshSmartSubtransportFactory, true) |
| 44 | if err != nil { |
| 45 | return fmt.Errorf("failed to register transport for %q: %v", protocol, err) |
| 46 | } |
| 47 | globalRegisteredSmartTransports.transports[protocol] = managed |
| 48 | } |
| 49 | return nil |
| 50 | } |
| 51 | |
| 52 | func sshSmartSubtransportFactory(remote *Remote, transport *Transport) (SmartSubtransport, error) { |
| 53 | return &sshSmartSubtransport{ |
no test coverage detected
searching dependent graphs…