IndexController: Don't try to be smart when diffing staged changes

We previously used some cool git syntax to display changes in the index.
The unfortunate side-effect of this was that the diff headers weren't correct,
so the unstage button didn't work anymore.
This commit is contained in:
Pieter de Bie
2008-12-02 00:40:33 +01:00
parent 41154efa15
commit e0d8df63e8
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -41,6 +41,8 @@
- (void) readUnstagedFiles:(NSNotification *)notification;
- (void) stageHunk: (NSString *)hunk reverse:(BOOL)reverse;
- (NSString *)parentTree;
- (IBAction) refresh:(id) sender;
- (IBAction) commit:(id) sender;
@end
+1 -1
View File
@@ -85,7 +85,7 @@
if (file.status == NEW)
return [commitController.repository outputForArguments:[NSArray arrayWithObjects:@"show", indexPath, nil]];
return [commitController.repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"diff", file.commitBlobSHA, indexPath, nil]];
return [commitController.repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"diff-index", @"-p", @"--cached", [commitController parentTree], @"--", file.path, nil]];
}
- (NSString *)unstagedChangesForFile:(PBChangedFile *)file