Skip to content

FR: git.sign-on-push should work with any setting of signing.behavior #9976

Description

@blastrock

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

I use signing.behavior = "force" at work, because I sometimes take over a colleague's branch, rebase/amend the commits and push again, so "own" is not enough. Our gitlab setup rejects any unsigned commit.

I have also set git.sign-on-push = true, because the key is protected by 1password and unlocking it is slow and tedious. This sign-on-push setting works when signing.behavior = "own" (as explained in the documentation), but not with "force".

Describe the solution you'd like

I'd like sign-on-push to be respected with any setting of signing.behavior. This doesn't look like a technical limitation, and I don't see any case where we would want to limit sign-on-push only to our own commits.

Describe alternatives you've considered

A workaround for me is to set signing.behavior = "own" to avoid unlocking 1password 20 times a day. Then, if I work on a colleague's branch, I just call jj sign explicitly to force-resign their commits.

Additional context

My config:

[--scope.signing]
behavior = "force"
#behavior = "own"
backend = "ssh"
key = "[redacted]"
backends.ssh.program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
[--scope.git]
sign-on-push = true # has no effect

Metadata

Metadata

Assignees

No one assigned

    Labels

    polish🪒🐃Make existing features more convenient and more consistent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions