@@ -446,9 +446,10 @@ ClassMethod Pull(remote As %String = "origin") As %Status
446
446
set branchName = outStream .ReadLine (outStream .Size )
447
447
write !, " Pulling from branch: " , branchName
448
448
449
- set sc = ..RunGitWithArgs (.errStream , .outStream , " pull" , remote _ " /" _ branchName )
449
+ set returnCode = ..RunGitWithArgs (.errStream , .outStream , " pull" , remote _ " /" _ branchName )
450
450
451
- quit sc
451
+ w !, " Pull ran with return code: " _ returnCode
452
+ quit $$$OK
452
453
}
453
454
454
455
ClassMethod Clone (remote As %String ) As %Status
@@ -1504,7 +1505,10 @@ ClassMethod RunGitCommand(command As %String, Output errStream, Output outStream
1504
1505
1505
1506
ClassMethod RunGitCommandWithInput (command As %String , inFile As %String = " " , Output errStream , Output outStream , args ...) As %Integer
1506
1507
{
1507
-
1508
+ set pullArg = " "
1509
+ if command = " pull" {
1510
+ set pullArg = args (1 )
1511
+ }
1508
1512
// Special case: git --version is used internally even when the settings incorporated here may be invalid/unspecified.
1509
1513
if (command '= " --version" ) {
1510
1514
set newArgs ($increment (newArgs )) = " -C"
@@ -1536,6 +1540,7 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
1536
1540
set syncIris = 0
1537
1541
set diffBase = " "
1538
1542
set diffCompare = " "
1543
+ set pullOriginIndex = " "
1539
1544
if (command = " checkout" ) || (command = " merge" ) || (command = " rebase" ) || (command = " pull" ){
1540
1545
set syncIris = 1
1541
1546
set diffCompare = args (args )
@@ -1545,6 +1550,9 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
1545
1550
for i =1 :1 :$get (args ) {
1546
1551
if ($data (args (i ))) {
1547
1552
set newArgs ($increment (newArgs )) = args (i )
1553
+ if newArgs (newArgs ) = pullArg {
1554
+ set pullOriginIndex = newArgs
1555
+ }
1548
1556
if (args (i ) = " checkout" ) || (args (i ) = " merge" ) || (args (i ) = " rebase" ) || (args (i ) = " pull" ){
1549
1557
set syncIris = 1
1550
1558
set diffCompare = args (i + 1 )
@@ -1553,6 +1561,10 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
1553
1561
set diffBase = args (i + 2 )
1554
1562
}
1555
1563
}
1564
+
1565
+ if (args (i ) = " pull" ) {
1566
+ set pullOriginIndex = i
1567
+ }
1556
1568
}
1557
1569
}
1558
1570
@@ -1583,6 +1595,10 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
1583
1595
set mod = files (files )
1584
1596
write !, ?4 , modification .changeType , ?4 , modification .internalName , ?4 , modification .externalName
1585
1597
}
1598
+
1599
+ if pullOriginIndex '= " " {
1600
+ set newArgs (pullOriginIndex ) = $piece (newArgs (pullOriginIndex ), " /" , 1 )
1601
+ }
1586
1602
}
1587
1603
1588
1604
set outLog = ##class (%Library.File ).TempFilename ()
0 commit comments