git_commit_extract_signature

Extract the signature from a commit

If the id is not for a commit, the error class will be git_error_t.GIT_ERROR_INVALID. If the commit does not have a signature, the error class will be git_error_t.GIT_ERROR_OBJECT.

Parameters

signature libgit2_d.buffer.git_buf*

the signature block; existing content will be overwritten

signed_data libgit2_d.buffer.git_buf*

signed data; this is the commit contents minus the signature block; existing content will be overwritten

repo libgit2_d.types.git_repository*

the repository in which the commit exists

commit_id libgit2_d.oid.git_oid*

the commit from which to extract the data

field const(char)*

the name of the header field containing the signature block; pass null to extract the default 'gpgsig'

Return Value

Type: int

0 on success, git_error_code.GIT_ENOTFOUND if the id is not for a commit or the commit does not have a signature.

Meta