This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
src/UnityExtension/Assets/Editor/GitHub.Unity/UI Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -259,19 +259,26 @@ private void MaybeUpdateData()
259259 currentBranch = string . Format ( "[{0}]" , Repository . CurrentBranchName ) ;
260260 }
261261
262- if ( currentStatusEntriesHasUpdate || currentLocksHasUpdate )
262+ if ( currentLocksHasUpdate )
263263 {
264- currentStatusEntriesHasUpdate = false ;
265- currentLocksHasUpdate = false ;
266-
267264 gitLocks = new HashSet < NPath > ( Repository . CurrentLocks . Select ( gitLock => gitLock . Path ) ) ;
265+ }
266+
267+ if ( currentStatusEntriesHasUpdate )
268+ {
268269 gitStatusEntries = Repository . CurrentChanges . Where ( x => x . Status != GitFileStatus . Ignored ) . ToList ( ) ;
269270
270271 changedFilesText = gitStatusEntries . Count == 0
271272 ? NoChangedFilesLabel
272273 : gitStatusEntries . Count == 1
273274 ? OneChangedFileLabel
274275 : String . Format ( ChangedFilesLabel , gitStatusEntries . Count ) ;
276+ }
277+
278+ if ( currentStatusEntriesHasUpdate || currentLocksHasUpdate )
279+ {
280+ currentStatusEntriesHasUpdate = false ;
281+ currentLocksHasUpdate = false ;
275282
276283 BuildTree ( ) ;
277284 }
You can’t perform that action at this time.
0 commit comments