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
Strip possible CR line endings and prefix each line with the required
leading space.

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 7487a5d commit c27deca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gitrevise/odb.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,11 @@ def new_commit(
input=body + body_tail,
check=True,
)
body += b"gpgsig " + gpg.stdout.replace(b"\n", b"\n ")
body = body[:-1]

body += b"gpgsig"
for line in gpg.stdout.splitlines():
body += b" " + line + b"\n"


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

0 comments on commit c27deca

Please sign in to comment.