From c077f234ea0817130f804c18769e633371db2fce Mon Sep 17 00:00:00 2001 From: Eric Allen Date: Sun, 11 Apr 2010 19:46:39 -0400 Subject: [PATCH] Allow zero lines of context Hunk/line patches don't generally have context Before this, every attempt to stage a hunk or line was met with "patch failed" using git 1.6.6 --- PBGitIndex.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PBGitIndex.m b/PBGitIndex.m index 4f0da98..ae954fa 100644 --- a/PBGitIndex.m +++ b/PBGitIndex.m @@ -388,7 +388,7 @@ NSString *PBGitIndexOperationFailed = @"PBGitIndexOperationFailed"; - (BOOL)applyPatch:(NSString *)hunk stage:(BOOL)stage reverse:(BOOL)reverse; { - NSMutableArray *array = [NSMutableArray arrayWithObjects:@"apply", nil]; + NSMutableArray *array = [NSMutableArray arrayWithObjects:@"apply", @"--unidiff-zero", nil]; if (stage) [array addObject:@"--cached"]; if (reverse)