Skip to content

Commit 9a35f64

Browse files
committed
feat: alert with warning if sync fails without commit
1 parent 974e2b6 commit 9a35f64

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cls/SourceControl/Git/Utils.cls

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,13 @@ ClassMethod UserAction(InternalName As %String, MenuName As %String, ByRef Targe
258258
set Action = 7
259259
set Msg = ..PreSync()
260260
} else {
261-
do ..Sync("")
261+
set Target = ""
262+
do ..Sync("",.Target)
263+
if (Target '= "") {
264+
set Action = 6
265+
}
262266
}
263267

264-
265268
quit $$$OK
266269
} elseif (menuItemName = "Push") {
267270
quit ..Push()
@@ -462,7 +465,7 @@ ClassMethod MergeDefaultRemoteBranch(Output alert As %String = "") As %Boolean
462465
if 'rebased {
463466
do ..RunGitCommand("rebase",.errStream, .outStream,"--abort")
464467
do ..PrintStreams(errStream, outStream)
465-
set alert = "WARNING: Remote branch '"_defaultMergeBranch_"' could not be merged due to conflicts. Changes have been pushed to '"_..GetCurrentBranch()_"' and must be resolved in your git remote."
468+
set alert = "WARNING: Remote branch '"_defaultMergeBranch_"' could not be merged due to conflicts. Changes have been pushed to '"_..GetCurrentBranch()_"' and must be resolved in your git remote. See log for more details."
466469
write !,alert,!
467470
}
468471
}

0 commit comments

Comments
 (0)