Enable rebasing and patching of commits even when using GPG #3758
Description
Is your feature request related to a problem? Please describe.
Lazygit does not allow rebasing of commits when the user uses GPG to sign his commits. There is a check in the source code (https://github.com/jesseduffield/lazygit/blob/master/pkg/commands/git_commands/rebase.go#L402) that prevents the user from doing a rebase (and thus any other function that needs rebasing such as rewording).
Describe the solution you'd like
The source code states
// we can make this GPG thing possible it just means we need to do this in two parts:
// one where we handle the possibility of a credential request, and the other
// where we continue the rebase
It'd be great if the behaviour could be implemented as signing commits is (IMHO) an important part of git, especially when committing to larger open source repos.
Additional context
Signing commits does work. Rebasing and patching (https://github.com/jesseduffield/lazygit/blob/master/pkg/commands/git_commands/patch.go#L153) does not.
To be honest I don't see why not (I guess I don't understand the workflow). However as I see it: When the user wants his commits to be signed the only thing that has to be changed is to add a -S
to the commands. git itself will take care of the rest.