8000 Switch helper to the true method · libgit2/objective-git@cbf5a64 · GitHub
[go: up one dir, main page]

Skip to content

Commit cbf5a64

Browse files
committed
Switch helper to the true method
1 parent a165378 commit cbf5a64

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

ObjectiveGitTests/GTUtilityFunctions.m

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@
4040
#pragma mark - Branch
4141

4242
BranchBlock localBranchWithName = ^ GTBranch * (NSString *branchName, GTRepository *repo) {
43-
NSString *reference = [GTBranch.localNamePrefix stringByAppendingString:branchName];
44-
NSArray *branches = [repo branchesWithPrefix:reference error:NULL];
45-
expect(branches).notTo(beNil());
46-
expect(@(branches.count)).to(equal(@1));
47-
expect(((GTBranch *)branches[0]).shortName).to(equal(branchName));
43+
BOOL success = NO;
44+
GTBranch *branch = [repo lookUpBranchWithName:branchName type:GTBranchTypeLocal success:&success error:NULL];
45+
expect(branch).notTo(beNil());
46+
expect(branch.shortName).to(equal(branchName));
4847

49-
return branches[0];
48+
return branch;
5049
};

0 commit comments

Comments
 (0)
0