From dc6ef566afdf27f64d6f16eafc49ee5a1e3f996c Mon Sep 17 00:00:00 2001 From: Oskar Grunning Date: Thu, 21 Mar 2019 15:54:13 +0100 Subject: [PATCH] [git] Add aliases for merge sign and verify Adds the following aliases: - gmS: GPG-sign the resulting merge commit. - gmV: Verify that the tip commit of the side branch being merged is signed with a valid key, i.e. a key that has a valid uid: in the default trust model, this means the signing key has been signed by a trusted key. If the tip commit of the side branch is not signed with a valid key, the merge is aborted. Closes #333 --- modules/git/README.md | 5 ++++- modules/git/init.zsh | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/git/README.md b/modules/git/README.md index 8e820a7..11c904b 100644 --- a/modules/git/README.md +++ b/modules/git/README.md @@ -112,10 +112,13 @@ Aliases ### Merge * `gm` joins two or more development histories together. + * `gma` aborts the conflict resolution, and reconstructs the pre-merge state. * `gmC` performs the merge but does not commit. * `gmF` performs the merge generating a commit even if the merge resolved as a fast-forward. - * `gma` aborts the conflict resolution, and reconstructs the pre-merge state. + * `gmS` commits with GPG signature. + * `gmv` verifies the GPG signature of the tip commit of the side branch being + merged. * `gmt` runs the merge conflict resolution tools to resolve conflicts. ### Push diff --git a/modules/git/init.zsh b/modules/git/init.zsh index b66ed00..24ffd7b 100644 --- a/modules/git/init.zsh +++ b/modules/git/init.zsh @@ -108,9 +108,11 @@ alias ${gprefix}lr='git reflog' # Merge (m) alias ${gprefix}m='git merge' +alias ${gprefix}ma='git merge --abort' alias ${gprefix}mC='git merge --no-commit' alias ${gprefix}mF='git merge --no-ff' -alias ${gprefix}ma='git merge --abort' +alias ${gprefix}mS='git merge -S' +alias ${gprefix}mv='git merge --verify-signatures' alias ${gprefix}mt='git mergetool' # Push (p)