Skip to content

Commit

Permalink
CommitView: Remove checking if same file is displayed
Browse files Browse the repository at this point in the history
This causes trouble if a file was partially staged,
or if we switch from the staged changes to the
unstaged changes.

It should be quick enough not to matter anyway, so
let's simplify things and remove the check.
  • Loading branch information
pieter committed Oct 10, 2008
1 parent fe38069 commit 4f212f0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions PBWebChangesController.h
Expand Up @@ -15,8 +15,6 @@
IBOutlet NSArrayController *unstagedFilesController; IBOutlet NSArrayController *unstagedFilesController;
IBOutlet NSArrayController *cachedFilesController; IBOutlet NSArrayController *cachedFilesController;
IBOutlet PBGitCommitController *controller; IBOutlet PBGitCommitController *controller;

id previousFile;
} }


- (void) showDiff:(PBChangedFile *)file cached:(BOOL)cached; - (void) showDiff:(PBChangedFile *)file cached:(BOOL)cached;
Expand Down
6 changes: 0 additions & 6 deletions PBWebChangesController.m
Expand Up @@ -58,12 +58,6 @@ - (void) showDiff:(PBChangedFile *)file cached:(BOOL) cached
return; return;
} }


// Don't reload if we already display this file
if (previousFile == file)
return;

previousFile = file;

id script = [view windowScriptObject]; id script = [view windowScriptObject];
NSLog(@"Showing diff.."); NSLog(@"Showing diff..");
[script callWebScriptMethod:@"showFileChanges" withArguments:[NSArray arrayWithObjects:file, [NSNumber numberWithBool:cached], nil]]; [script callWebScriptMethod:@"showFileChanges" withArguments:[NSArray arrayWithObjects:file, [NSNumber numberWithBool:cached], nil]];
Expand Down

0 comments on commit 4f212f0

Please sign in to comment.