Skip to content

Commit e3304fa

Browse files
Uwe Heeslaullon
authored andcommitted
[brotherbardGH-24] Fix a bug in stageFile/unstageFile with multiple files
1 parent 940e09d commit e3304fa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

PBGitIndex.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,12 @@ - (BOOL)stageFiles:(NSArray *)stageFiles
301301
PBChangedFile *file = [stageFiles objectAtIndex:i];
302302

303303
[input appendFormat:@"%@", file.path];
304+
[input appendString:@"\n"];
304305
}
305306

306307

307308
int ret = 1;
308-
[repository outputForArguments:[NSArray arrayWithObjects:@"update-index", @"--add", @"--remove", @"-z", @"--stdin", nil]
309+
[repository outputForArguments:[NSArray arrayWithObjects:@"update-index", @"--add", @"--remove", @"--stdin", nil]
309310
inputString:input
310311
retValue:&ret];
311312

@@ -357,10 +358,11 @@ - (BOOL)unstageFiles:(NSArray *)unstageFiles
357358
PBChangedFile *file = [unstageFiles objectAtIndex:i];
358359

359360
[input appendString:[file indexInfo]];
361+
[input appendString:@"\n"];
360362
}
361363

362364
int ret = 1;
363-
[repository outputForArguments:[NSArray arrayWithObjects:@"update-index", @"-z", @"--index-info", nil]
365+
[repository outputForArguments:[NSArray arrayWithObjects:@"update-index", @"--index-info", nil]
364366
inputString:input
365367
retValue:&ret];
366368

0 commit comments

Comments
 (0)