Skip to content

mnemonicPrefix = true in gitconfig breaks hunk staging #6096

Description

@bo5o

Describe the bug

Setting mnemonicPrefix = true under [diff] in gitconfig breaks staging hunks in the latest lazygit. Pressing space in the focused diff shows "Apply Patch" in the command log, but nothing gets staged. Discarding and unstaging are affected the same way.

To Reproduce

Steps to reproduce the behavior:

  1. git config --global diff.mnemonicPrefix true
  2. Modify a tracked file in any repo
  3. In lazygit, select the file in the Files panel and press enter to focus its diff
  4. Press space on a hunk or line
  5. "Apply Patch" appears in the command log, but the change stays unstaged (git status confirms)

Expected behavior

The selected hunk or line is staged, the same as without diff.mnemonicPrefix.

Screenshots

n/a

Version info:

commit=c5f7158154602d23b0750d4304c73e2aead8df5b, build date=2026-10-05T17:12:24Z, build source=binaryRelease, version=0.66.0, os=linux, arch=amd64, git version=2.55.0

Terminal info:

Ghostty 1.3.1

Additional Context

None

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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