libgit2

git_commit_signature_cb

Version:

Commit signing callback: used when a function is going to write a commit (for example, in git_commit_create_ext) to allow callers to sign the commit.

Signature

typedef int git_commit_signature_cb(git_commitbuilder *builder, git_repository *repo, const char *commit_content, void *payload);

Parameters

In
builder

commit builder object to populate with the signature

In
repo

the repository being committed in

const char *
In
commit_content

the raw contents of the commit (to be signed)

void *
In
payload

the caller-specified callback payload

Returns

int

0 if this callback has created a signature and populated the field and signature buffers, GIT_PASSTHROUGH if the callback does not want to sign the commit, any other value to stop and return a failure

Versions