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
This commit is contained in:
Eric Allen
2010-04-11 19:46:39 -04:00
committed by Nathan Kinsinger
parent d4cb11bb8b
commit c077f234ea
+1 -1
View File
@@ -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)