Permalink
Browse files

CommitController: Notify observers when adding files

We forgot to do this when changing the code in 963969a
(CommitController: don't mutate array we enumerate when refreshing index).
This meant that some changes in the index would not be shown when refreshing,
for example newly added or changed files.
  • Loading branch information...
1 parent 4391c45 commit ad2213ce2f40db33253e2db15a38acd5f3d641eb @pieter committed Jun 16, 2009
Showing with 5 additions and 0 deletions.
  1. +5 −0 PBGitCommitController.m
View
@@ -264,6 +264,10 @@ - (void) addFilesFromDictionary:(NSMutableDictionary *)dictionary staged:(BOOL)s
}
// Do new files
+ if (![[dictionary allKeys] count])
+ return;
+
+ [self willChangeValueForKey:@"files"];
for (NSString *path in [dictionary allKeys]) {
NSArray *fileStatus = [dictionary objectForKey:path];
@@ -285,6 +289,7 @@ - (void) addFilesFromDictionary:(NSMutableDictionary *)dictionary staged:(BOOL)s
[files addObject: file];
}
+ [self didChangeValueForKey:@"files"];
}
- (void) readUnstagedFiles:(NSNotification *)notification

0 comments on commit ad2213c

Please sign in to comment.