From 58e695b1486a32ed8c3b1e1cdd3974b6721661cb Mon Sep 17 00:00:00 2001 From: NanoTech Date: Thu, 15 Dec 2016 00:37:37 -0600 Subject: [PATCH] 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 --- Classes/git/PBGitIndex.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/git/PBGitIndex.m b/Classes/git/PBGitIndex.m index 16372bf8..21b2e3e6 100644 --- a/Classes/git/PBGitIndex.m +++ b/Classes/git/PBGitIndex.m @@ -404,7 +404,7 @@ - (BOOL)performStageOrUnstage:(BOOL)stage withFiles:(NSArray *)files NSString *indexInfo; if (file.status == NEW) { // Index info lies because the file is NEW - indexInfo = [NSString stringWithFormat:@"0 0000000000000000000000000000000000000000\t\"%@\"", file.path]; + indexInfo = [NSString stringWithFormat:@"0 0000000000000000000000000000000000000000\t%@\0", file.path]; } else { indexInfo = [file indexInfo]; }