Skip to content

Commit 30981af

Browse files
committed
fix: cover top-level stash command too
This could ultimately use some refactoring, but regardless, it's working.
1 parent 6719fdc commit 30981af

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cls/SourceControl/Git/Utils.cls

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,6 +1634,7 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
16341634
set diffBase = ""
16351635
set diffCompare = ""
16361636
set invert = 0
1637+
set whichStash = ""
16371638

16381639
// Find / build file list
16391640
set hasFileList = 0
@@ -1669,6 +1670,17 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
16691670
if $data(args) && $data(args(args),diffCompare) {
16701671
// no-op
16711672
}
1673+
} elseif (command = "stash") {
1674+
set subcommand = $Get(args(1))
1675+
set whichStash = $Get(args(2))
1676+
if subcommand = "push" {
1677+
set syncIrisWithDiff = 1
1678+
set diffCompare = ""
1679+
set invert = 1
1680+
} elseif (subcommand = "pop") || (subcommand = "apply") {
1681+
set syncIrisWithDiff = 1
1682+
set diffCompare = whichStash
1683+
}
16721684
}
16731685

16741686
// WebUI prefixes with "color.ui=true" so we need to grab the command

0 commit comments

Comments
 (0)