Skip to content

Commit 6719fdc

Browse files
committed
feat: smarter sync with stash ops
1 parent 1fad7a5 commit 6719fdc

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

cls/SourceControl/Git/Utils.cls

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,12 +1686,20 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
16861686
set diffBase = args(i + 2)
16871687
}
16881688
}
1689-
} elseif (args(i) = "restore") || (args(i) = "stash") {
1690-
// stash list shouldn't trigger anything
1691-
if ($Get(args(i + 1)) '= "list") {
1689+
} elseif (args(i) = "restore") {
1690+
set syncIrisWithDiff = 1
1691+
set diffCompare = ""
1692+
set invert = 1
1693+
} elseif (args(i) = "stash") {
1694+
set subcommand = $Get(args(i + 1))
1695+
set whichStash = $Get(args(i + 2))
1696+
if subcommand = "push" {
16921697
set syncIrisWithDiff = 1
16931698
set diffCompare = ""
16941699
set invert = 1
1700+
} elseif (subcommand = "pop") || (subcommand = "apply") {
1701+
set syncIrisWithDiff = 1
1702+
set diffCompare = whichStash
16951703
}
16961704
} elseif (args(i) = "merge") || (args(i) = "rebase") || (args(i) = "pull") {
16971705
set syncIrisWithCommand = 1

0 commit comments

Comments
 (0)