Skip to content

Commit fad28bd

Browse files
committed
fix: swap order of conditions for slightly better performance in instance-wide uncommitted check
1 parent ff0245f commit fad28bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cls/SourceControl/Git/Extension.cls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ Method UserAction(Type As %Integer, Name As %String, InternalName As %String, Se
6666
write !, Target
6767
set Action = 6
6868
} elseif settings.warnInstanceWideUncommitted
69-
&& ##class(SourceControl.Git.Utils).InstanceWideUncommittedCheck(InternalName, .user, .inNamespace)
70-
&& '(##class(SourceControl.Git.Utils).ItemIsProductionToDecompose(InternalName)) {
69+
&& '(##class(SourceControl.Git.Utils).ItemIsProductionToDecompose(InternalName))
70+
&& ##class(SourceControl.Git.Utils).InstanceWideUncommittedCheck(InternalName, .user, .inNamespace) {
7171
// if item is being edited in a different namespace, opening it will display an alert. Editing in this namespace will remove the alert.
7272
set Target = "Warning: Item " _ InternalName _ " is currently being modified by " _ user _ " in namespace " _ inNamespace _ "."
7373
write !, Target

0 commit comments

Comments
 (0)