mirror of
https://github.com/gosticks/SwiftGit2.git
synced 2025-10-16 11:55:34 +00:00
Return error here because something is happening
but not running out of commits
This commit is contained in:
parent
42d92319ef
commit
8088f8b11f
@ -58,7 +58,7 @@ public class CommitIterator: IteratorProtocol {
|
|||||||
let lookupGitResult = git_commit_lookup(&unsafeCommit, repo.pointer, &oid)
|
let lookupGitResult = git_commit_lookup(&unsafeCommit, repo.pointer, &oid)
|
||||||
guard lookupGitResult == GIT_OK.rawValue,
|
guard lookupGitResult == GIT_OK.rawValue,
|
||||||
let unwrapCommit = unsafeCommit else {
|
let unwrapCommit = unsafeCommit else {
|
||||||
return nil
|
return Result.failure(NSError(gitError: lookupGitResult, pointOfFailure: "git_commit_lookup"))
|
||||||
}
|
}
|
||||||
let result: Element = Result.success(Commit(unwrapCommit))
|
let result: Element = Result.success(Commit(unwrapCommit))
|
||||||
git_commit_free(unsafeCommit)
|
git_commit_free(unsafeCommit)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user