lazygit
lazygit copied to clipboard
"Move patch into new commit" sometimes fails
Describe the bug
Sometimes when using "Move patch into new commit", I get error: <changed file>: does not exist in index.
To Reproduce This was hard to pinpoint, but the following steps reproduce the behavior for me consistently:
- In an empty directory, run the following commands
git init
touch test.txt
git add .
git commit -m 1
echo "one" > test.txt
git add .
git commit -m 2
echo "
two" >> test.txt
git add .
git commit -m 3
- In lazygit, try to move the empty line between "one" and "two" from the last commit into a new commit -> error!
Expected behavior
There is a new, 4th commit called Split from "3" only containing the empty line between "one" and "two"
Version info: Lazygit: 0.33 and master at 448ff80d git: 2.35.1
Additional context So far, I've only tested this on 2 different Debian machines. I'm planning on debugging this some more, but would be happy about any input.