Skip to content

Commit

Permalink
Merge branch 'pu/pb/index_quick_fix' into stable
Browse files Browse the repository at this point in the history
* pu/pb/index_quick_fix:
  CommitView: Don't keep rearranging when iterating over files
  IndexController: de-privatize the index-stopping stuff
  • Loading branch information
pieter committed Sep 14, 2009
2 parents 3324591 + 00731eb commit 2cdf2b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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
3 changes: 3 additions & 0 deletions PBGitIndexController.h
Expand Up @@ -36,5 +36,8 @@
- (NSString *) stagedChangesForFile:(PBChangedFile *)file;
- (NSString *) unstagedChangesForFile:(PBChangedFile *)file;

- (void)stopTrackingIndex;
- (void)resumeTrackingIndex;

- (NSMenu *) menuForTable:(NSTableView *)table;
@end
5 changes: 0 additions & 5 deletions PBGitIndexController.m
Expand Up @@ -12,11 +12,6 @@

#define FileChangesTableViewType @"GitFileChangedType"

@interface PBGitIndexController (PrivateMethods)
- (void)stopTrackingIndex;
- (void)resumeTrackingIndex;
@end

@implementation PBGitIndexController

@synthesize contextSize;
Expand Down

0 comments on commit 2cdf2b6

Please sign in to comment.