Skip to content

Commit 00731eb

Browse files
committed
CommitView: Don't keep rearranging when iterating over files
1 parent 9167113 commit 00731eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

PBGitCommitController.m

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#import "PBChangedFile.h"
1212
#import "PBWebChangesController.h"
1313
#import "NSString_RegEx.h"
14-
14+
#import "PBGitIndexController.h"
1515

1616
@interface PBGitCommitController (PrivateMethods)
1717
- (NSArray *) linesFromNotification:(NSNotification *)notification;
@@ -240,6 +240,7 @@ - (NSMutableDictionary *)dictionaryForLines:(NSArray *)lines
240240
- (void) addFilesFromDictionary:(NSMutableDictionary *)dictionary staged:(BOOL)staged tracked:(BOOL)tracked
241241
{
242242
// Iterate over all existing files
243+
[indexController stopTrackingIndex];
243244
for (PBChangedFile *file in files) {
244245
NSArray *fileStatus = [dictionary objectForKey:file.path];
245246
// Object found, this is still a cached / uncached thing
@@ -270,6 +271,7 @@ - (void) addFilesFromDictionary:(NSMutableDictionary *)dictionary staged:(BOOL)s
270271
file.hasUnstagedChanges = NO;
271272
}
272273
}
274+
[indexController resumeTrackingIndex];
273275

274276
// Do new files
275277
if (![[dictionary allKeys] count])

0 commit comments

Comments
 (0)