@@ -712,7 +712,8 @@ ClassMethod Clone(remote As %String) As %Status
712712 // TODO: eventually use /ENV flag with GIT_TERMINAL_PROMPT=0. (This isn't doc'd yet and is only in really new versions.)
713713 set rc = ..RunGitWithArgs (.errStream , .outStream , " clone" , remote , settings .namespaceTemp )
714714 if rc '= 0 {
715- quit $$$ERROR($$$GeneralError, " Git clone failed: " _errStream .Read ())
715+ set errMsg = errStream .Read ()
716+ quit $$$ERROR($$$GeneralError, " Git clone failed: " _errMsg )
716717 }
717718 // can I substitute this with the new print method?
718719 $$$NewLineIfNonEmptyStream(errStream )
@@ -1956,12 +1957,18 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
19561957 set email = ..GitUserEmail ()
19571958 }
19581959
1959- set newArgs ($increment (newArgs )) = " -c"
1960- set newArgs ($increment (newArgs )) = " user.name=" _username
1961- set newArgs ($increment (newArgs )) = " -c"
1962- set newArgs ($increment (newArgs )) = " user.email=" _email
1963- set newArgs ($increment (newArgs )) = " -c"
1964- set newArgs ($increment (newArgs )) = " credential.interactive=false"
1960+ if username '= " " {
1961+ set newArgs ($increment (newArgs )) = " -c"
1962+ set newArgs ($increment (newArgs )) = " user.name=" _username
1963+ }
1964+ if email '= " " {
1965+ set newArgs ($increment (newArgs )) = " -c"
1966+ set newArgs ($increment (newArgs )) = " user.email=" _email
1967+ }
1968+ if ('..UsingOAuth ()) {
1969+ set newArgs ($increment (newArgs )) = " -c"
1970+ set newArgs ($increment (newArgs )) = " credential.interactive=false"
1971+ }
19651972 }
19661973
19671974 set newArgs ($increment (newArgs )) = command
@@ -2127,7 +2134,7 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
21272134
21282135 set baseArgs = " /STDOUT=" _$$$QUOTE(outLog )_" /STDERR=" _$$$QUOTE(errLog )_$case (inFile , " " :" " , :" /STDIN=" _$$$QUOTE(inFile ))
21292136 // Use OAuth Authentication if needed (TODO: Should this be done always, or only for certain commands?)
2130- if (( ..UsingOAuth () )) {
2137+ if (..UsingOAuth ()) {
21312138 set token = ##class (SourceControl.Git.OAuth2 ).GetToken ()
21322139 if (token '= " " ) {
21332140 if ($$$isWINDOWS) {
0 commit comments