lazygit
lazygit copied to clipboard
feature: Enable discard of previous commit files when signed with GPG
As someone who signs all their commits with GPG one thing I find super frustrating is when I want to discard some changes to a specific file on a commit that happened a while back in history.
The current behaviour is the error message Feature not available for users using GPG
appears.
I'm not sure how complex this would be but if it's low priority would you be able to list the high level steps necessary and I could take a stab.
Thanks for your amazing work!
I was also wondering the same thing, as I too sign all my commits by default and am missing the mentioned functionality. Judging by the comment in https://github.com/jesseduffield/lazygit/blob/master/pkg/commands/rebasing.go#L213-L215, this is simply missing a preliminary step to allow for a pinentry. Even a simple override over this error would be enough for users with cached credentials or keychain integrations.
Since I build lazygit from source, if anyone is using a key store / caching and is interested in patching away this restriction, it appears to work without issue. Here's the patch: remove-disabled-for-gpg.txt
@oliverguenther, thank you a lot. It works!
Can we maybe add config option for this? So users can just configure desired behavior without building from source?
Yes, having a config option for this would be awesome as long as it is not implemented.
I'm really not too familiar with go but I'll take a look when I find the time. It should be rather simple
It looks to me like the existing option git.overrideGpg
might suffice - it got reword
s working for me with cached GPG credentials.
git:
overrideGpg: true
See also: https://github.com/jesseduffield/lazygit/issues/1146
Thanks @mwinckler for mentioning this! Yes, this can be closed.
CC @jesseduffield