ingydotnet / git-subrepo

MIT License
3.18k stars 263 forks source link

Adds the ability to `--gpg-sign` new commits to the upstream #615

Open edvinassabaliauskas opened 3 months ago

edvinassabaliauskas commented 3 months ago
kuwannet commented 2 months ago

I’ve been playing with this and have some comments…

  1. It would be good to honor whether commit.gpgsign=true has been set via git config and automatically pass -S or --gpg-sign to the commands that need it. Per the git documentation:

    To configure your Git client to sign commits by default for a local repository, in Git versions 2.0.0 and above, run git config commit.gpgsign true. To sign all commits by default in any local repository on your computer, run git config --global commit.gpgsign true.

    When you have commit.gpgsign=true set and are used to having commits always signed automatically, it’s easy to forget to add the option to the git subrepo … commands.

  2. It would also be nice to use the -S option as a synonym for --gpg-sign as is supported by git itself:

    -S[<keyid>], --gpg-sign[=<keyid>], …
        GPG-sign commits. The keyid argument is optional and defaults to the committer identity; if specified, it must be stuck to the option
        without a space…