mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user