Skip to content

Commit

Permalink
CommitView: Don't keep rearranging when iterating over files
Browse files Browse the repository at this point in the history
  • Loading branch information
pieter committed Sep 12, 2009
1 parent 9167113 commit 00731eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion PBGitCommitController.m
Expand Up @@ -11,7 +11,7 @@
#import "PBChangedFile.h"
#import "PBWebChangesController.h"
#import "NSString_RegEx.h"

#import "PBGitIndexController.h"

@interface PBGitCommitController (PrivateMethods)
- (NSArray *) linesFromNotification:(NSNotification *)notification;
Expand Down Expand Up @@ -240,6 +240,7 @@ - (NSMutableDictionary *)dictionaryForLines:(NSArray *)lines
- (void) addFilesFromDictionary:(NSMutableDictionary *)dictionary staged:(BOOL)staged tracked:(BOOL)tracked
{
// Iterate over all existing files
[indexController stopTrackingIndex];
for (PBChangedFile *file in files) {
NSArray *fileStatus = [dictionary objectForKey:file.path];
// Object found, this is still a cached / uncached thing
Expand Down Expand Up @@ -270,6 +271,7 @@ - (void) addFilesFromDictionary:(NSMutableDictionary *)dictionary staged:(BOOL)s
file.hasUnstagedChanges = NO;
}
}
[indexController resumeTrackingIndex];

// Do new files
if (![[dictionary allKeys] count])
Expand Down

0 comments on commit 00731eb

Please sign in to comment.