mirror of
https://github.com/gosticks/SwiftGit2.git
synced 2025-10-16 11:55:34 +00:00
also should check success of git_status_init_options
This commit is contained in:
parent
42619872f8
commit
bf2bc2ed88
@ -677,7 +677,10 @@ final public class Repository {
|
||||
|
||||
// Do this because GIT_STATUS_OPTIONS_INIT is unavailable in swift
|
||||
let pointer = UnsafeMutablePointer<git_status_options>.allocate(capacity: 1)
|
||||
git_status_init_options(pointer, UInt32(GIT_STATUS_OPTIONS_VERSION))
|
||||
let optionsResult = git_status_init_options(pointer, UInt32(GIT_STATUS_OPTIONS_VERSION))
|
||||
guard optionsResult == GIT_OK.rawValue else {
|
||||
return Result.failure(NSError(gitError: optionsResult, pointOfFailure: "git_status_init_options"))
|
||||
}
|
||||
var options = pointer.move()
|
||||
pointer.deallocate(capacity: 1)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user