Skip to content

Commit 2ee72c9

Browse files
committed
Use Objective-Git to check ref validity
Continuing work on issue #2
1 parent 542aef2 commit 2ee72c9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Classes/git/PBGitRepository.m

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -453,11 +453,8 @@ - (BOOL)isRefOnHeadBranch:(PBGitRef *)testRef
453453

454454
- (BOOL) checkRefFormat:(NSString *)refName
455455
{
456-
int retValue = 1;
457-
[self outputInWorkdirForArguments:[NSArray arrayWithObjects:@"check-ref-format", refName, nil] retValue:&retValue];
458-
if (retValue)
459-
return NO;
460-
return YES;
456+
BOOL result = [GTReference isValidReferenceName:refName];
457+
return result;
461458
}
462459

463460
- (BOOL) refExists:(PBGitRef *)ref

0 commit comments

Comments
 (0)