From 58eeeab67b1a0a67c6d93711f52cb34db1d61ab2 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 28 Nov 2024 19:36:07 +0800 Subject: [PATCH] enhance: set `core.autocrlf` to `false` when run `git diff` to get detail changes of selected file (#761) --- src/Commands/Diff.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Commands/Diff.cs b/src/Commands/Diff.cs index dea15592..da971e58 100644 --- a/src/Commands/Diff.cs +++ b/src/Commands/Diff.cs @@ -28,9 +28,9 @@ namespace SourceGit.Commands Context = repo; 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 - 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()