altsem / gitu

A TUI Git client inspired by Magit
MIT License
1.65k stars 86 forks source link

fix: bad diffs when git's `autocrlf` was enabled #169

Closed altsem closed 1 month ago

altsem commented 1 month ago

Before all CRLF would already be converted to LF after the diff was made (due to line 85 / how Ratatui's Text works). Now this happens before the diff is made.

resolves: #162

I might've overlooked something, but I think this would work. @bshashank, @rzikm

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.04%. Comparing base (0cb5e6a) to head (d65d4cb).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #169 +/- ## ========================================== + Coverage 86.51% 87.04% +0.52% ========================================== Files 58 58 Lines 4473 4491 +18 ========================================== + Hits 3870 3909 +39 + Misses 603 582 -21 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rzikm commented 1 month ago

This fixes the problem in my use case. Thanks!