diff options
| author | Tyler Wanek <tylerw@axosoft.com> | 2019-01-24 08:42:25 -0700 |
|---|---|---|
| committer | Tyler Wanek <tylerw@axosoft.com> | 2019-01-24 08:42:25 -0700 |
| commit | 0d06bf4852a3b943a40c6378f638b7f0bb8972b9 (patch) | |
| tree | 88392104bb3c20f28dc19eb089985fc7f7e9bd90 /src/rebase.c | |
| parent | 3a8ef8240f2bf93876d867d4db98c1f30180fe67 (diff) | |
| download | libgit2-0d06bf4852a3b943a40c6378f638b7f0bb8972b9.tar.gz | |
fixup: More generic signing_cb for future flexibility
In the case that we want to build merge + commit, cherrypick + commit, or even just build a commit with signing callback, `git_rebase_commit_signature_cb` particular callback should be made more generic. We also renamed `signature_cb` to `signing_cb` to improve clarity on the purpose of the callback (build a difference between a git_signature and the act of signing).
So we've ended up with `git_commit_signing_cb`.
Diffstat (limited to 'src/rebase.c')
| -rw-r--r-- | src/rebase.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rebase.c b/src/rebase.c index 288af70ec..10a4b80c0 100644 --- a/src/rebase.c +++ b/src/rebase.c @@ -981,12 +981,12 @@ static int rebase_commit__create( /* this error will be cleared by the signing process, but should be set * to signal the unsigned commit create process if we are not going to sign */ error = GIT_PASSTHROUGH; - if (rebase->options.signature_cb) { + if (rebase->options.signing_cb) { if ((error = git_commit_create_buffer(&commit_content, rebase->repo, author, committer, message_encoding, message, tree, 1, (const git_commit **)&parent_commit)) < 0) goto done; - if ((error = rebase->options.signature_cb(&commit_signature, &signature_field, + if ((error = rebase->options.signing_cb(&commit_signature, &signature_field, git_buf_cstr(&commit_content), rebase->options.payload)) < 0 && error != GIT_PASSTHROUGH) goto done; |
