Skip to content

"Feature not available for users using GPG." is shown too late #4611

Open
@wolfgangwalther

Description

@wolfgangwalther

Describe the bug

With GPG signing enabled but git.overrideGpg = false, this error message will appear when trying to edit a non-latest commit:

DisabledForGPG: "Feature not available for users using GPG.\n\nIf you are using a passphrase agent (e.g. gpg-agent) so that you don't have to type your passphrase when signing, you can enable this feature by adding\n\ngit:\n overrideGpg: true\n\nto your lazygit config file.",

However, this error message only appears after applying the changes in the commit message editor. It happened more than once to me, that I wrote a beautiful commit message... which was then gone, because of that error!

To Reproduce
Steps to reproduce the behavior:

  1. Enable GPG signing.
  2. Select the second to last commit.
  3. Hit r to reword and make some changes.
  4. See the error appear - too late.

Expected behavior

The error should already be shown when starting the "reword this commit" process, before entering that editor.

Version info:

commit=, build date=, build source=nix, version=0.51.1, os=linux, arch=amd64, git version=2.49.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions