toasterllc/debase

feature request: signing commits

jeremyschlatter opened this issue · 0 comments

I have git configured to sign all of my commits, but when I make edits through debase they are not signed.

I looked through the libgit2 api to see what it would take to implement this, and unfortunately it doesn't look totally straightforward. libgit2 does have a hook specifically intended for signing commits:

/**
* Optional callback that allows users to override commit
* creation in `git_rebase_commit`. If specified, users can
* create their own commit and provide the commit ID, which
* may be useful for signing commits or otherwise customizing
* the commit creation.
*
* If this callback returns `GIT_PASSTHROUGH`, then
* `git_rebase_commit` will continue to create the commit.
*/
git_commit_create_cb commit_create_cb;

...but only during rebase, not amending. And you still have to implement the signing yourself.

Nonetheless, this would be a nice feature to have. As it is now, my only unsigned commits are ones created by debase, which makes them stand out and makes me less inclined to use debase to create them in the first place. I can kind of work around it by amending them a second time after using debase, but it's tedious.