TortoiseGitMerge can create empty lines without line break in some situations
What steps will reproduce the problem?
- Create a new local Git repository
- Create commit
CommitA
with filetest.txt
whose content isa test
- Create commit
CommitB1
changingtest.txt
's content tob1 test
- Create a new branch at
CommitA
and switch to it - Create commit
CommitB2
changingtest.txt
's content tob2 test
- Try merging branch
main
(ormaster
) into the current branch
ℹ A merge conflict should occur - In the TortoiseGitMerge window in the "Merged" pane:
- Have a close look at the editor content
❌ Line 1 is missing a line break - Mark the file as resolved
- Open the file with a third-party editor
❌ The texttest
is on line 2 instead of line 3 as it was shown by the TortoiseGitMerge window, that is, a line break is missing
What is the expected output? What do you see instead?
Expected: The line numbers and lines shown by TortoiseGitMerge match the actual result.
Actual: As shown by the reproduction steps, TortoiseGitMerge shows empty lines where there are in fact no empty lines in the actual result (due to missing line breaks).
What version of TortoiseGit and Git are you using? On what operating system?
TortoiseGit 2.12.0.0
git version 2.33.0.windows.2
Windows 10
Please provide any additional information below.
There might be multiple variants of this. I have had it at least two times that I removed a line break by accident this way when resolving merge conflicts.
Probably related to #3252 (closed).