Skip to content

rebase in gitbutler cause conflicts with line endings when autocrlf is set to true #5558

@hayt

Description

@hayt

Version

0.13.14

Operating System

Windows

Distribution Method

msi (Windows)

Describe the issue

I was trying to test gitbutler on an already existing repository where I have autocrlf true enabled because I work on windows and use the git-bash there.

When I now change a commit with the edit patch option I will get conflicts in all subsequent commits over the whole file because the line endings are different.

How to reproduce

  • setup a repo without gitbutler. On windows with autocrlf set to true

  • Have a file with an initial commit and some text with line breaks.

  • make a new branch that is not main

  • make commit 1 where you add another line with text to the beginning of the file

  • make commit 2 where you add another line with text to the end of the file

  • open that repo with gitbutler and edit commit 1, where you change something in the line you introduced with that commit

  • commit 2 should now show up as conflict.

When I check the conflicting file with an editor that shows crlf characters, the "ours" part has crlf as line nedings, while tne ancestor and "theirs" uses LF

Expected behavior

the autocrlf setting should be respected and I should not get merge conflicts based on line endings.

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working🎉reproduced🎉The issue could be reproduced by following the instructions🦀gitoxide🦀`gitoxide` might help here

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions