mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
CommitView: Also show deleted files correctly
This commit is contained in:
+10
-2
@@ -39,6 +39,9 @@
|
||||
case NEW:
|
||||
filename = @"new_file";
|
||||
break;
|
||||
case DELETED:
|
||||
filename = @"deleted_file";
|
||||
break;
|
||||
default:
|
||||
filename = @"empty_file";
|
||||
break;
|
||||
@@ -49,11 +52,16 @@
|
||||
|
||||
- (void) stageChanges
|
||||
{
|
||||
[repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"add", path, nil]];
|
||||
if (status == DELETED)
|
||||
[repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"rm", path, nil]];
|
||||
else
|
||||
[repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"add", path, nil]];
|
||||
|
||||
self.cached = YES;
|
||||
}
|
||||
- (void) unstageChanges
|
||||
{ [repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"reset", @"--", path, nil]];
|
||||
{
|
||||
[repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"reset", @"--", path, nil]];
|
||||
self.cached = NO;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user