Skip to content

Commit 8249c96

Browse files
committed
error control on branch counters
1 parent 526f246 commit 8249c96

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

PBGitRepository.m

+3-2
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,9 @@ -(NSNumber *)countCommintsOf:(NSString *)branchs
303303
{
304304
NSLog(@"branchs:'%@'",branchs);
305305
NSArray *args = [NSArray arrayWithObjects:@"rev-list", branchs, nil];
306-
NSString *o = [self outputForArguments:args];
307-
if ([o length]==0) {
306+
int ret;
307+
NSString *o = [self outputForArguments:args retValue:&ret];
308+
if ((ret!=0) || ([o length]==0)) {
308309
return NULL;
309310
}
310311
NSArray *commits = [o componentsSeparatedByString:@"\n"];

0 commit comments

Comments
 (0)