Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: don't sign commits without a description #5108

Closed
jalil-salame opened this issue Dec 16, 2024 · 4 comments
Closed

FR: don't sign commits without a description #5108

jalil-salame opened this issue Dec 16, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@jalil-salame
Copy link

jalil-salame commented Dec 16, 2024

If you are interested in this feature please look at #5108 (comment). Tl; dr: not likely to be accepted, instead help out with #4747

Is your feature request related to a problem? Please describe.

I have to use a hw key to sign my commits at work, this means I have to set sign-all = true until we have the jj sign command.

Setting sign-all = true causes way too many commits to be signed. Signing only commits with a description would be better.

For example a typical jj commit workflow causes three commits to be signed:

  1. sign the snapshot of the working copy
  2. sign the commit you have described
  3. sign the new commit that was created

Describe the solution you'd like
Only sign commits with a commit message, this would prevent signatures 1 and 3 in the above example.

Describe alternatives you've considered
Once jj sign is completed, set sign-all = false and do one of:

  • jj sign main..bookmark before pushing to sign all commits in a branch
  • signing.sign-on-push = true do jj sign main..bookmark before pushing automatically.

Additional context
This is specially painful when using a HW key as you need to enter a PIN and touch the HW key for the signature to be processed.

I would prefer to only sign before pushing as if I mistype the PIN I might loose the commit message. I haven't so far though c:

@PhilipMetzger PhilipMetzger added the enhancement New feature or request label Dec 16, 2024
@mrnossiom
Copy link
Member

I have taken the habit to have all my commit signed on GitHub. My GPG key is cached for some time, so this is not a blocker for me. Though it is sometimes annoying that running common jj commands, which trigger a repo snapshot, force me to enter my password to continue (as it needs to sign the snapshot commit).

@jalil-salame
Copy link
Author

For me, I have a hardware key which requires me to reach around and touch it to sign the commits, it is in an inconvenient place rn, but I can't cache that so it is extra annoying.

@martinvonz
Copy link
Member

I think the alternatives options you mention sound better. So if anyone wants to make progress in this area, I would prefer they do it by helping get #4747 landed.

@bnjmnt4n
Copy link
Member

Closing this for the more general solution #4712 (and accompanying PR #4747).

@bnjmnt4n bnjmnt4n closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants