Make it possible to use a git2go error as a return value from a signing callback and have it propagate
This commit is contained in:
parent
1ec8a67fe4
commit
23fcabf687
|
@ -86,6 +86,9 @@ func commitSignCallback(_signature *C.git_buf, _signature_field *C.git_buf, _com
|
||||||
|
|
||||||
signature, signatureField, err := opts.SigningCallback(commitContent)
|
signature, signatureField, err := opts.SigningCallback(commitContent)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if gitError, ok := err.(*GitError); ok {
|
||||||
|
return C.int(gitError.Code)
|
||||||
|
}
|
||||||
return C.int(-1)
|
return C.int(-1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue