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;
242
242
243
243
- (GTReference *)headReferenceWithError : (NSError **)error ;
244
244
245
- // / Convenience methods to return branches in the repository
246
- - (NSArray *)allBranchesWithError : (NSError **)error ;
247
-
248
245
- (NSArray *)localBranchesWithError : (NSError **)error ;
249
246
- (NSArray *)remoteBranchesWithError : (NSError **)error ;
250
247
- (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 {
401
401
return branches;
402
402
}
403
403
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
-
428
404
- (NSArray *)branches : (NSError **)error {
429
405
NSArray *localBranches = [self localBranchesWithError: error];
430
406
if (localBranches == nil ) return nil ;
Original file line number Diff line number Diff line change 52
52
53
53
it (@" should write to a specific repository and return a tree" , ^{
54
54
GTRepository *repository = self.bareFixtureRepository ;
55
- NSArray *branches = [repository allBranchesWithError :NULL ];
55
+ NSArray *branches = [repository branches :NULL ];
56
56
GTCommit *masterCommit = [branches[0 ] targetCommitAndReturnError: NULL ];
57
57
GTCommit *packedCommit = [branches[1 ] targetCommitAndReturnError: NULL ];
58
58
You can’t perform that action at this time.
0 commit comments