forked from mystor/git-revise
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for GPG-signed commits (mystor#46)
GPG-sign commits if option -S/--gpg-sign is given, or if configurations revise.gpgSign or commit.gpgSign are set to true. Unlike Git, we do not support passing the key ID as argument. Git's way of accepting this optional argument is a bit weird. It would be awkward to try to support the same with argparse. So it's probably best to use a separate argument for the key ID in future. For now, the key ID is taken from Git configuration (user.signingKey) or the committer signature as fallback. A call of `git-revise COMMIT --gpg-sign` w/o any changes in the index causes creation of GPG commit signatures for all commits since COMMIT. Conversely, if GPG signing is disabled, git-revise will remove the signature, even if the commits were not modified otherwise. So adding/removing a signature is just another modification, like rewording/rebasing. This logic is applied to all commits in the todo-list. The test is a bit large, but the pieces are mostly independen. Maybe we should share the GPG initialization somehow? Closes mystor#46 Closes mystor#73 Co-authored-by: Johannes Altmanninger <aclopte@gmail.com> Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
- Loading branch information
Showing
7 changed files
with
227 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.