Browse Source

[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
Oskar Grunning 5 years ago
parent
commit
dc6ef566af
2 changed files with 7 additions and 2 deletions
  1. 4 1
      modules/git/README.md
  2. 3 1
      modules/git/init.zsh

+ 4 - 1
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

+ 3 - 1
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)