From ad2213ce2f40db33253e2db15a38acd5f3d641eb Mon Sep 17 00:00:00 2001 From: Pieter de Bie Date: Tue, 16 Jun 2009 19:06:57 +0100 Subject: [PATCH] CommitController: Notify observers when adding files We forgot to do this when changing the code in 963969af78 (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. --- PBGitCommitController.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PBGitCommitController.m b/PBGitCommitController.m index def7238..f41ffe2 100644 --- a/PBGitCommitController.m +++ b/PBGitCommitController.m @@ -264,6 +264,10 @@ } // 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 @@ [files addObject: file]; } + [self didChangeValueForKey:@"files"]; } - (void) readUnstagedFiles:(NSNotification *)notification