Re: Git SSH/GPG signing flags and config
From: Junio C Hamano <hidden>
Date: 2021-11-28 23:22:41
Fabian Stelzer [off-list ref] writes:
Hi everyone, the `signing git objects with ssh` series was released with 2.34 and i'd like to thank everyone for your support and the good reviews! I think it would be beneficial now to adjust some of the wording in flags and the config. Currently everything is configured via gpg.* and all the `please sign this` flags are named --(no-?)gpg-sign. I would be in favor of a more generic flag independent of the signing mechanism. Adding something like `--ssh-sign` would suggest that you'd be able to switch signing format with it which i think would not be terribly useful. If you need to use multiple signing mechanism those would usually be configured per repository and can easily be done with an `includeif gitdir:` in your config. Therefore i would suggest just adding a generic `--(no-?)sign` to all the commands that support gpg-sign right now. The only problem i see is a conflict with `--signoff` so i'm open to other naming ideas. The same goes for the config. `sign.` as an alias to `gpg.` would work well with the current settings. Let me know what you think and i could prepare a first patch for one command to see what the alias / config / docs change could look like.
I do share your worry about --sign to be confused with the sign-off procedure, and that was why the original used --gpg-sign. We are extending "gpg" part because "gpg" is not the only cryptographic signing protocol we support, so perhaps --crypto-sign would still be in the orginal spirit of "This is different from the sign-off, but is a cryptographic signature, but it is a mouthful.