This repository is used to reproduce a bug in Lazygit related to the custom patch application feature.
-
Clone this repository:
git clone https://github.com/black-desk/lazygit-bug-report-2025-04-29 cd lazygit-bug-report-2025-04-29
-
Build a custom patch from changes to the
test.md
file inHEAD^
. -
Move the patch to a new commit.
Expected Result: The patch should be applied successfully.
Actual Result: Git fails to apply the patch.
Here's a simple example to verify the issue in another way:
# Create a patch with zero context lines
git format-patch HEAD^ -U0
# Try to apply the patch in reverse
git apply --reverse *.patch
This will clearly demonstrate the patch application failure.