66 "github.com/git-lfs/git-lfs/v3/config"
77 "github.com/git-lfs/git-lfs/v3/subprocess"
88 "github.com/git-lfs/pktline"
9+ "github.com/rubyist/tracerx"
910)
1011
1112type SSHTransfer struct {
@@ -35,6 +36,7 @@ func NewSSHTransfer(osEnv config.Environment, gitEnv config.Environment, meta *S
3536}
3637
3738func startConnection (id int , osEnv config.Environment , gitEnv config.Environment , meta * SSHMetadata , operation string ) (* PktlineConnection , bool , error ) {
39+ tracerx .Printf ("spawning pure SSH connection" )
3840 exe , args , multiplexing := GetLFSExeAndArgs (osEnv , gitEnv , meta , "git-lfs-transfer" , operation , true )
3941 cmd , err := subprocess .ExecCommand (exe , args ... )
4042 if err != nil {
@@ -71,6 +73,7 @@ func startConnection(id int, osEnv config.Environment, gitEnv config.Environment
7173 w .Close ()
7274 cmd .Wait ()
7375 }
76+ tracerx .Printf ("pure SSH connection successful" )
7477 return conn , multiplexing , err
7578}
7679
@@ -121,6 +124,7 @@ func (tr *SSHTransfer) setConnectionCount(n int) error {
121124 count := len (tr .conn )
122125 if n < count {
123126 for _ , item := range tr .conn [n :count ] {
127+ tracerx .Printf ("terminating pure SSH connection (%d -> %d)" , count , n )
124128 if err := item .End (); err != nil {
125129 return err
126130 }
@@ -130,6 +134,7 @@ func (tr *SSHTransfer) setConnectionCount(n int) error {
130134 for i := count ; i < n ; i ++ {
131135 conn , _ , err := startConnection (i , tr .osEnv , tr .gitEnv , tr .meta , tr .operation )
132136 if err != nil {
137+ tracerx .Printf ("failed to spawn pure SSH connection: %s" , err )
133138 return err
134139 }
135140 tr .conn = append (tr .conn , conn )
@@ -139,5 +144,6 @@ func (tr *SSHTransfer) setConnectionCount(n int) error {
139144}
140145
141146func (tr * SSHTransfer ) Shutdown () error {
147+ tracerx .Printf ("shutting down pure SSH connection" )
142148 return tr .SetConnectionCount (0 )
143149}
0 commit comments