Skip to content

Commit

Permalink
squash! Add support for GPG-signed commits (mystor#46)
Browse files Browse the repository at this point in the history
Check whether the signature creation was successful.

Suggested-by: Nika Layzell <nika@thelayzells.com>
Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
  • Loading branch information
Nicolas Schier committed Nov 2, 2020
1 parent c27deca commit 3a8f964
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gitrevise/odb.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ def new_commit(
for line in gpg.stdout.splitlines():
body += b" " + line + b"\n"

if not b"\n[GNUPG:] SIG_CREATED " in gpg.stdout:
raise CalledProcessError()

except CalledProcessError as gpg:
print(gpg.stderr.decode(), file=sys.stderr, end="")
Expand Down

0 comments on commit 3a8f964

Please sign in to comment.