You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When you have GPG passphrase setup to be prompt in CLI, it will hang indefinitely when trying to reword the last commit. No input can reach the gpg prompt.
While it works when you just want to do a normal commit.
The question is just to access gpghelper from RebaseCommands and wrap the commands using gpghelper.
Maybe I can try to figure it out this weekend or this month when I am free, could also see if I can add initial gpg support to rebasing as mentioned here.
Neko-Box-Coder
changed the title
Rewording last commit hangs freezes when GPG passphrase is needed in CLI
Rewording last commit freezes when GPG passphrase is needed in CLI
Aug 7, 2024
An easier fix is probably to make the distinction of "is this the head commit" at the call site of RebaseCommands.RewordCommit (in LocalCommitsController.handleReword) rather than inside it. LocalCommitsController has access to the gpgHelper. This would then be similar to what we already do for Amend.
Describe the bug
When you have GPG passphrase setup to be prompt in CLI, it will hang indefinitely when trying to reword the last commit. No input can reach the gpg prompt.
While it works when you just want to do a normal commit.
To Reproduce
Steps to reproduce the behavior:
pinentry-mode loopback
in~/.gnupg/gpg.conf
gpg-connect-agent reloadagent /bye
Expected behavior
You should be able to enter your passphrase and submit it to GPG prompt.
Screenshots

Version info:
commit=v0.42.0, build date=2024-05-19T10:54:29Z, build source=binaryRelease, version=0.42.0, os=linux, arch=amd64, git version=2.45.2
Additional context
This relates #3758 and #30.
It seems like it goes through the same code path as rebasing which does not have explicit GPG support.
The line in question is in here:
lazygit/pkg/commands/git_commands/rebase.go
Lines 37 to 41 in a3560eb
GPG works fine when committing normally, it goes to a different code path which can handle gpg.
lazygit/pkg/gui/controllers/helpers/working_tree_helper.go
Lines 103 to 110 in a3560eb
The question is just to access
gpghelper
fromRebaseCommands
and wrap the commands usinggpghelper
.Maybe I can try to figure it out this weekend or this month when I am free, could also see if I can add initial gpg support to rebasing as mentioned here.
lazygit/pkg/commands/git_commands/rebase.go
Lines 392 to 405 in a3560eb
The text was updated successfully, but these errors were encountered: