@@ -79,6 +79,11 @@ ClassMethod GitUserEmail() As %String
79
79
Quit $Get (@..#Storage@(" settings" ," user" ,$username ," gitUserEmail" ))
80
80
}
81
81
82
+ ClassMethod PrivateKeyFile () As %String
83
+ {
84
+ Quit $Get (@..#Storage@(" settings" ," ssh" ," privateKeyFile" ))
85
+ }
86
+
82
87
ClassMethod NeedSettings () As %Boolean [ CodeMode = expression ]
83
88
{
84
89
(..DefaultTemp () = " " ) || (..GitBinPath () = " " ) || (..GitBinPath () = " " " " )
@@ -110,6 +115,7 @@ ClassMethod UpdateSettings(ByRef settings) As %Status
110
115
set @..#Storage@(" settings" ," groupByFolder" ) = $case (settings (" groupByFolder" ), " " :" " , :1 )
111
116
set @..#Storage@(" settings" ," user" ,$username ," gitUserName" ) = settings (" gitUserName" )
112
117
set @..#Storage@(" settings" ," user" ,$username ," gitUserEmail" ) = settings (" gitUserEmail" )
118
+ set @..#Storage@(" settings" ," ssh" ," privateKeyFile" ) = settings (" privateKeyFile" )
113
119
114
120
quit $$$OK
115
121
}
@@ -306,6 +312,8 @@ ClassMethod Fetch(ByRef diffFiles) As %Status
306
312
while (outStream .AtEnd = 0 ) {
307
313
set diffFiles = diffFiles _$lb (outStream .ReadLine ())
308
314
}
315
+ do outStream .Rewind ()
316
+ do outStream .OutputToDevice ()
309
317
quit $$$OK
310
318
}
311
319
@@ -1096,6 +1104,12 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
1096
1104
set newArgs ($i (newArgs )) = " -C"
1097
1105
set newArgs ($i (newArgs )) = ..TempFolder ()
1098
1106
1107
+ set privateKeyFile = ..PrivateKeyFile ()
1108
+ if (privateKeyFile '= " " ) {
1109
+ set newArgs ($i (newArgs )) = " -c"
1110
+ set newArgs ($i (newArgs )) = " core.sshCommand=ssh -F /dev/null -i " _privateKeyFile
1111
+ }
1112
+
1099
1113
set username = ..GitUserName ()
1100
1114
set email = ..GitUserEmail ()
1101
1115
0 commit comments