Skip to content

Commit

Permalink
Make the underlying git_revwalk object accessible
Browse files Browse the repository at this point in the history
  • Loading branch information
tiennou committed Jun 19, 2017
1 parent 4ad19cd commit 0bd0c21
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ObjectiveGit/GTEnumerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ NS_ASSUME_NONNULL_BEGIN

- (instancetype)init NS_UNAVAILABLE;

/// The underlying `git_revwalk` from libgit2.
- (git_revwalk *)git_revwalk __attribute__((objc_returns_inner_pointer));

/// Initializes the receiver to enumerate the commits in the given repository. Designated initializer.
///
/// repo - The repository to enumerate the commits of. This must not be nil.
Expand Down
4 changes: 4 additions & 0 deletions ObjectiveGit/GTEnumerator.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ - (instancetype)init {
return nil;
}

- (git_revwalk *)git_revwalk {
return self.walk;
}

- (instancetype)initWithRepository:(GTRepository *)repo error:(NSError **)error {
NSParameterAssert(repo != nil);

Expand Down

0 comments on commit 0bd0c21

Please sign in to comment.