enhance: set core.autocrlf to false when run git diff to get detail changes of selected file (#761)

This commit is contained in:
leo 2024-11-28 19:36:07 +08:00
parent 8f4d3fd957
commit 58eeeab67b
No known key found for this signature in database

View file

@ -28,9 +28,9 @@ namespace SourceGit.Commands
Context = repo; Context = repo;
if (ignoreWhitespace) if (ignoreWhitespace)
Args = $"diff --no-ext-diff --patch --ignore-cr-at-eol --ignore-all-space --unified={unified} {opt}"; Args = $"-c core.autocrlf=false diff --no-ext-diff --patch --ignore-cr-at-eol --ignore-all-space --unified={unified} {opt}";
else else
Args = $"diff --no-ext-diff --patch --ignore-cr-at-eol --unified={unified} {opt}"; Args = $"-c core.autocrlf=false diff --no-ext-diff --patch --ignore-cr-at-eol --unified={unified} {opt}";
} }
public Models.DiffResult Result() public Models.DiffResult Result()