File tree Expand file tree Collapse file tree 3 files changed +1
-28
lines changed Expand file tree Collapse file tree 3 files changed +1
-28
lines changed Original file line number Diff line number Diff line change @@ -242,9 +242,6 @@ extern NSString * const GTRepositoryInitOptionsOriginURLString;
242242
243243- (GTReference *)headReferenceWithError : (NSError **)error ;
244244
245- // / Convenience methods to return branches in the repository
246- - (NSArray *)allBranchesWithError : (NSError **)error ;
247-
248245- (NSArray *)localBranchesWithError : (NSError **)error ;
249246- (NSArray *)remoteBranchesWithError : (NSError **)error ;
250247- (NSArray *)branchesWithPrefix : (NSString *)prefix error : (NSError **)error ;
Original file line number Diff line number Diff line change @@ -401,30 +401,6 @@ - (NSArray *)branchesWithPrefix:(NSString *)prefix error:(NSError **)error {
401401 return branches;
402402}
403403
404- - (NSArray *)allBranchesWithError : (NSError **)error {
405- NSMutableArray *allBranches = [NSMutableArray array ];
406- NSArray *localBranches = [self localBranchesWithError: error];
407- NSArray *remoteBranches = [self remoteBranchesWithError: error];
408- if (localBranches == nil || remoteBranches == nil ) return nil ;
409-
410- [allBranches addObjectsFromArray: localBranches];
411-
412- // we want to add the remote branches that we don't already have as a local branch
413- NSMutableDictionary *shortNamesToBranches = [NSMutableDictionary dictionary ];
414- for (GTBranch *branch in localBranches) {
415- [shortNamesToBranches setObject: branch forKey: branch.shortName];
416- }
417-
418- for (GTBranch *branch in remoteBranches) {
419- GTBranch *localBranch = [shortNamesToBranches objectForKey: branch.shortName];
420- if (localBranch == nil ) {
421- [allBranches addObject: branch];
422- }
423- }
424-
425- return allBranches;
426- }
427-
428404- (NSArray *)branches : (NSError **)error {
429405 NSArray *localBranches = [self localBranchesWithError: error];
430406 if (localBranches == nil ) return nil ;
Original file line number Diff line number Diff line change 5252
5353it (@" should write to a specific repository and return a tree" , ^{
5454 GTRepository *repository = self.bareFixtureRepository ;
55- NSArray *branches = [repository allBranchesWithError :NULL ];
55+ NSArray *branches = [repository branches :NULL ];
5656 GTCommit *masterCommit = [branches[0 ] targetCommitAndReturnError: NULL ];
5757 GTCommit *packedCommit = [branches[1 ] targetCommitAndReturnError: NULL ];
5858
You can’t perform that action at this time.
0 commit comments