Skip to content

Commit 8adce97

Browse files
committed
Use the new API.
1 parent a9f2487 commit 8adce97

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ObjectiveGit/GTRepository+RemoteOperations.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#import "GTSignature.h"
1818
#import "NSArray+StringArray.h"
1919
#import "NSError+Git.h"
20+
#import "GTRepository+References.h"
2021

2122
#import "git2/errors.h"
2223
#import "git2/remote.h"
@@ -120,7 +121,7 @@ int GTFetchHeadEntriesCallback(const char *ref_name, const char *remote_url, con
120121
GTRepository *repository = entriesPayload->repository;
121122
GTRemoteEnumerateFetchHeadEntryBlock enumerationBlock = entriesPayload->enumerationBlock;
122123

123-
GTReference *reference = [GTReference referenceByLookingUpReferencedNamed:@(ref_name) inRepository:repository error:NULL];
124+
GTReference *reference = [repository lookUpReferenceWithName:@(ref_name) error:NULL];
124125

125126
GTFetchHeadEntry *entry = [[GTFetchHeadEntry alloc] initWithReference:reference remoteURLString:@(remote_url) targetOID:[GTOID oidWithGitOid:oid] isMerge:(BOOL)is_merge];
126127

ObjectiveGit/GTRepository.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#import "NSArray+StringArray.h"
5252
#import "NSError+Git.h"
5353
#import "NSString+Git.h"
54+
#import "GTRepository+References.h"
5455

5556
#import "git2.h"
5657

@@ -401,7 +402,7 @@ - (NSArray *)branchesWithPrefix:(NSString *)prefix error:(NSError **)error {
401402
for (NSString *refName in references) {
402403
if (![refName hasPrefix:prefix]) continue;
403404

404-
GTReference *ref = [[GTReference alloc] initByLookingUpReferenceNamed:refName inRepository:self error:error];
405+
GTReference *ref = [self lookUpReferenceWithName:refName error:error];
405406
if (ref == nil) continue;
406407

407408
GTBranch *branch = [[GTBranch alloc] initWithReference:ref repository:self];

0 commit comments

Comments
 (0)