Skip to content

Commit f3d8e35

Browse files
committed
Make the underlying git_revwalk object accessible
1 parent 3b00247 commit f3d8e35

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

ObjectiveGit/GTEnumerator.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ NS_ASSUME_NONNULL_BEGIN
6464

6565
- (instancetype)init NS_UNAVAILABLE;
6666

67+
/// The underlying `git_revwalk` from libgit2.
68+
- (git_revwalk *)git_revwalk __attribute__((objc_returns_inner_pointer));
69+
6770
/// Initializes the receiver to enumerate the commits in the given repository. Designated initializer.
6871
///
6972
/// repo - The repository to enumerate the commits of. This must not be nil.

ObjectiveGit/GTEnumerator.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ - (instancetype)init {
5353
return nil;
5454
}
5555

56+
- (git_revwalk *)git_revwalk {
57+
return self.walk;
58+
}
59+
5660
- (instancetype)initWithRepository:(GTRepository *)repo error:(NSError **)error {
5761
NSParameterAssert(repo != nil);
5862

0 commit comments

Comments
 (0)