Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • TortoiseGit TortoiseGit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 380
    • Issues 380
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TortoiseGitTortoiseGit
  • TortoiseGitTortoiseGit
  • Issues
  • #3791
Closed
Open
Issue created Aug 29, 2021 by Marcono1234@Marcono1234

TortoiseGitMerge can create empty lines without line break in some situations

What steps will reproduce the problem?

  1. Create a new local Git repository
  2. Create commit CommitA with file test.txt whose content is
    a
    
    test
  3. Create commit CommitB1 changing test.txt's content to
    b1
    
    test
  4. Create a new branch at CommitA and switch to it
  5. Create commit CommitB2 changing test.txt's content to
    b2
    
    test
  6. Try merging branch main (or master) into the current branch
    ℹ A merge conflict should occur
  7. In the TortoiseGitMerge window in the "Merged" pane:
    1. Position your cursor behind the a
    2. Press Enter
    3. Press Del
      ℹ The editor content should now look like this:
      Editor content
  8. Have a close look at the editor content
    ❌ Line 1 is missing a line break
  9. Mark the file as resolved
  10. Open the file with a third-party editor
    ❌ The text test 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).

Edited Aug 29, 2021 by Marcono1234
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking