Skip to content

Commit 054bbf7

Browse files
committed
enhance: do not override core.autocrlf configure while reading file diff (#1278)
Signed-off-by: leo <[email protected]>
1 parent ce00fa6 commit 054bbf7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Commands/Diff.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ public Diff(string repo, Models.DiffOption opt, int unified, bool ignoreWhitespa
2828
Context = repo;
2929

3030
if (ignoreWhitespace)
31-
Args = $"-c core.autocrlf=false diff --no-ext-diff --patch --ignore-all-space --unified={unified} {opt}";
31+
Args = $"diff --no-ext-diff --patch --ignore-all-space --unified={unified} {opt}";
3232
else if (Models.DiffOption.IgnoreCRAtEOL)
33-
Args = $"-c core.autocrlf=false diff --no-ext-diff --patch --ignore-cr-at-eol --unified={unified} {opt}";
33+
Args = $"diff --no-ext-diff --patch --ignore-cr-at-eol --unified={unified} {opt}";
3434
else
35-
Args = $"-c core.autocrlf=false diff --no-ext-diff --patch --unified={unified} {opt}";
35+
Args = $"diff --no-ext-diff --patch --unified={unified} {opt}";
3636
}
3737

3838
public Models.DiffResult Result()

0 commit comments

Comments
 (0)