@@ -126,29 +126,39 @@ ClassMethod RefreshUncommitted(Display = 0, IncludeRevert = 0, Output gitFiles,
126
126
do ##class (Utils ).GitStatus (.gitFiles )
127
127
128
128
// Remove entries in the uncommitted queue that don't correspond to changes as tracked by git
129
- set filename =" " , filename =$order (tFileList (filename ),1 ,action )
130
- while (filename '=" " ) {
131
- set examine =$select (action =" add" :1 ,action =" edit" :1 ,action =" delete" :1 , IncludeRevert &&(action =" revert" ):1 ,1 :0 )
132
- if 'examine set filename =$order (tFileList (filename ),1 ,action ) continue
129
+ set filename =" "
130
+ for {
131
+ set filename =$order (tFileList (filename ),1 ,action )
132
+ quit :filename =" "
133
+
134
+ set examine =$select (action =" add" :1 ,
135
+ action =" edit" :1 ,
136
+ action =" delete" :1 ,
137
+ IncludeRevert &&(action =" revert" ):1 ,
138
+ 1 :0 )
139
+ if 'examine {
140
+ continue
141
+ }
133
142
134
143
set packageRoot = ##class (SourceControl.Git.Utils ).TempFolder ()
135
144
set InternalName = ##class (SourceControl.Git.Utils ).NameToInternalName (filename ,0 ,0 )
136
145
137
146
// skip files belonging to other git enabled packages
138
147
if ($EXTRACT (filename , 1 , $LENGTH (packageRoot )) '= packageRoot ) continue
139
-
140
148
141
149
if (('##class (%File ).Exists (filename )) || (InternalName = " " ) || ((InternalName '= " " ) && ('$data (gitFiles (InternalName ), found )) &&
142
150
(($data ($$$TrackedItems(InternalName ))) || ##class (SourceControl.Git.Utils ).NormalizeExtension ($data ($$$TrackedItems(InternalName )))))) {
143
151
set sc =..RemoveUncommitted (filename ,Display ,0 ,0 )
144
- if $$$ISERR(sc ) set filename = " " continue
152
+ if $$$ISERR(sc ) continue
145
153
}
146
- set filename =$order (tFileList (filename ),1 ,action )
147
154
}
148
155
149
156
// Add missing records to the uncommitted queue that correspond to changes as tracked by git
150
- set filename =" " , filename =$order (gitFiles (filename ),1 ,details )
151
- while (filename '=" " ) {
157
+ set filename =" "
158
+ for {
159
+ set filename =$order (gitFiles (filename ),1 ,details )
160
+ quit :filename =" "
161
+
152
162
set InternalName = filename
153
163
set ExternalName = ##class (%File ).NormalizeFilename (##class (SourceControl.Git.Utils ).TempFolder ()_$list (details ,2 ))
154
164
set changeType = $list (details ,1 )
@@ -161,9 +171,8 @@ ClassMethod RefreshUncommitted(Display = 0, IncludeRevert = 0, Output gitFiles,
161
171
162
172
if ((##class (%File ).Exists (ExternalName )) && ('$ISVALIDNUM (InternalName )) && ('..IsUncommitted (ExternalName )) && ($data ($$$TrackedItems(InternalName )))) {
163
173
set sc =..SetUncommitted (ExternalName , action , InternalName , $USERNAME , " " , 1 , " " , " " , 0 )
164
- if $$$ISERR(sc ) w sc set filename = " " continue
174
+ if $$$ISERR(sc ) continue
165
175
}
166
- set filename =$order (gitFiles (filename ),1 ,details )
167
176
}
168
177
set ^IRIS .Temp .gitsourcecontrol (" Refresh" ) = $zdatetime ($ztimestamp ,-2 )
169
178
merge ^IRIS .Temp .gitsourcecontrol (" LastUncommitted" ) = gitFiles
0 commit comments