【问题标题】:Signing arc diff commits without using git config commit.gpgsign在不使用 git config commit.gpgsign 的情况下签署 arc diff 提交
【发布时间】:2018-08-25 16:16:07
【问题描述】:
有没有办法让arc diff 像git commit -S 那样提交签名的差异提交?我知道git config commit.gpgsign true 将让arc diff 开始签署提交,但我正在寻找某种方式,如果我忘记关闭commit.gpgsign,则不会开始尝试签署我在该存储库中所做的所有其他事情。
【问题讨论】:
标签:
git
phabricator
arcanist
gpg-signature
【解决方案1】:
最简单的方法是创建一个自定义 shell 脚本,按顺序运行您提到的这些命令并将其用于单次提交,例如:
#!/bin/bash
git config commit.gpgsign true
path-to-arc-bin diff
git config commit.gpgsign false
并将其保存为arc-diff-signed 命令。并将其链接到/usr/local/bin/,这样您就可以方便地在任何地方的 shell 中运行它。