Describe the bug
When you change multiple consecutive lines and then try to stage just the first change, this results in the wrong patch.
To Reproduce
Steps to reproduce the behavior:
- Take the following file:
int main() {
// init something
int i = 0;
return 0;
}
- Update it to:
int main() {
// init variables
int x = 0;
return 0;
}
- Now in LazyGit try to only stage the comment-line:
- The actual result
The lines are shuffeled:
Expected behavior
The comment should be staged without changing the order of the lines:
(This has been done with git-gui)
Version info:
commit=, build date=, build source=Homebrew, version=0.57.0, os=darwin, arch=arm64, git version=2.52.0
I already tried to find a duplicate of this one but failed, maybe due to the keyword I was using ;)