Skip to content

Commit

Permalink
Rename GITRepo -remotes to GITRepo -remoteBranches and return an arra…
Browse files Browse the repository at this point in the history
…y of GITBranch objects instead of GITRefs
  • Loading branch information
geoffgarside committed Jan 17, 2010
1 parent c20a72d commit 6b543d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/GITRepo.h
Expand Up @@ -108,7 +108,7 @@
* \return array of remotes from the receiver
* \sa GITRefResolver
*/
- (NSArray *)remotes;
- (NSArray *)remoteBranches;

/*!
* Returns an array containing tags from the receiver.
Expand Down
11 changes: 9 additions & 2 deletions Source/GITRepo.m
Expand Up @@ -150,8 +150,15 @@ - (NSArray *)branches {
return [[branches copy] autorelease];
}

- (NSArray *)remotes {
return [[self refResolver] remoteRefs];
- (NSArray *)remoteBranches {
NSArray *remoteRefs = [[self refResolver] remoteRefs];
NSMutableArray *branches = [NSMutableArray arrayWithCapacity:[remoteRefs count]];

for ( GITRef *ref in remoteRefs ) {
[branches addObject:[GITBranch branchFromRef:ref]];
}

return [[branches copy] autorelease];
}

- (NSArray *)tags {
Expand Down

0 comments on commit 6b543d0

Please sign in to comment.