#16027

Selected-line commits can lose line breaks

Openlokproopened 1mo ago

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

  1. Open a file with multiple lines in GitButler.
  2. Select only a subset of lines to stage/commit.
  3. Create the commit.
  4. Check the commit preview or the resulting file content.
  5. 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
9

Actual behavior

The staged/committed result can drop newline boundaries and produce malformed content. bad result:

4
5
68
9

System 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

0

No activity yet.