Skip to content

Commit 58e695b

Browse files
committed
Fix unstaging new files
update-index -z is set, so paths must be NUL delimited and not quoted. See https://github.com/git/git/blob/v2.11.0/builtin/update-index.c#L525-L531
1 parent df65378 commit 58e695b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Classes/git/PBGitIndex.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ - (BOOL)performStageOrUnstage:(BOOL)stage withFiles:(NSArray *)files
404404
NSString *indexInfo;
405405
if (file.status == NEW) {
406406
// Index info lies because the file is NEW
407-
indexInfo = [NSString stringWithFormat:@"0 0000000000000000000000000000000000000000\t\"%@\"", file.path];
407+
indexInfo = [NSString stringWithFormat:@"0 0000000000000000000000000000000000000000\t%@\0", file.path];
408408
} else {
409409
indexInfo = [file indexInfo];
410410
}

0 commit comments

Comments
 (0)