#16027
Selected-line commits can lose line breaks
Version
0.22.3
Operating System
Windows
Distribution Method
msi (Windows)
Describe the issue
When staging/committing only selected lines from a file, the generated result can lose line breaks or merge adjacent lines. The preview and the final committed content can differ from the expected output.
Steps to reproduce
- Open a file with multiple lines in GitButler.
- Select only a subset of lines to stage/commit.
- Create the commit.
- Check the commit preview or the resulting file content.
- Observe that line breaks are missing or lines are shifted/merged.
Expected behavior
The selected lines should be committed without altering line separation or adjacent content. Expected:
4
5
6
8
9Actual behavior
The staged/committed result can drop newline boundaries and produce malformed content. bad result:
4
5
68
9System information
-
GitButler app 0.22.3
-
GitButler CLI: but 0.22.3
-
OS: Windows 11 Pro 10.0.22631 (23H2), 64-bit
-
Git: 2.53.0.windows.1
-
set at system level in C:\Program Files\Git\etc\gitconfig (checkout LF→CRLF, commit CRLF→LF)
-
my VS Code editor uses CR LF 1.txt.zip
Activity
0No activity yet.