diff --git a/src/Commands/Diff.cs b/src/Commands/Diff.cs
index 8ae6350f..a4e05ae5 100644
--- a/src/Commands/Diff.cs
+++ b/src/Commands/Diff.cs
@@ -30,7 +30,7 @@ namespace SourceGit.Commands
if (ignoreWhitespace)
Args = $"-c core.autocrlf=false diff --no-ext-diff --patch --ignore-cr-at-eol --ignore-all-space --unified={unified} {opt}";
else
- Args = $"-c core.autocrlf=false diff --no-ext-diff --patch --ignore-cr-at-eol --unified={unified} {opt}";
+ Args = $"-c core.autocrlf=false diff --no-ext-diff --patch --unified={unified} {opt}";
}
public Models.DiffResult Result()
diff --git a/src/Resources/Locales/de_DE.axaml b/src/Resources/Locales/de_DE.axaml
index 25b54c60..1ceac07c 100644
--- a/src/Resources/Locales/de_DE.axaml
+++ b/src/Resources/Locales/de_DE.axaml
@@ -235,7 +235,7 @@
ALT
Kopieren
Dateimodus geändert
- Ignoriere Leerzeichenänderungen
+ Ignoriere Leerzeichenänderungen und EOL
LFS OBJEKT ÄNDERUNG
Nächste Änderung
KEINE ÄNDERUNG ODER NUR ZEILEN-ENDE ÄNDERUNGEN
diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml
index ad71427b..7ec38670 100644
--- a/src/Resources/Locales/en_US.axaml
+++ b/src/Resources/Locales/en_US.axaml
@@ -241,7 +241,7 @@
Copy
File Mode Changed
First Difference
- Ignore Whitespace Change
+ Ignore Whitespace Change and EOL
Last Difference
LFS OBJECT CHANGE
Next Difference
diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml
index e2af0860..04fdde4b 100644
--- a/src/Resources/Locales/es_ES.axaml
+++ b/src/Resources/Locales/es_ES.axaml
@@ -240,7 +240,7 @@
Copiar
Modo de Archivo Cambiado
Primera Diferencia
- Ignorar Cambio de Espacios en Blanco
+ Ignorar Cambio de Espacios en Blanco y EOL
Última Diferencia
CAMBIO DE OBJETO LFS
Siguiente Diferencia
diff --git a/src/Resources/Locales/fr_FR.axaml b/src/Resources/Locales/fr_FR.axaml
index 83d590f5..f5679ab8 100644
--- a/src/Resources/Locales/fr_FR.axaml
+++ b/src/Resources/Locales/fr_FR.axaml
@@ -241,7 +241,7 @@
Copier
Mode de fichier changé
Première différence
- Ignorer les changements d'espaces
+ Ignorer les changements d'espaces et EOL
Dernière différence
CHANGEMENT D'OBJET LFS
Différence suivante
diff --git a/src/Resources/Locales/it_IT.axaml b/src/Resources/Locales/it_IT.axaml
index 59bf3028..5ed81da2 100644
--- a/src/Resources/Locales/it_IT.axaml
+++ b/src/Resources/Locales/it_IT.axaml
@@ -239,7 +239,7 @@
Copia
Modalità File Modificata
Prima differenza
- Ignora Modifiche agli Spazi
+ Ignora Modifiche agli Spazi e EOL
Ultima differenza
MODIFICA OGGETTO LFS
Differenza Successiva
diff --git a/src/Resources/Locales/ja_JP.axaml b/src/Resources/Locales/ja_JP.axaml
index fe643b5e..1b94ed6f 100644
--- a/src/Resources/Locales/ja_JP.axaml
+++ b/src/Resources/Locales/ja_JP.axaml
@@ -240,7 +240,7 @@
コピー
ファイルモードが変更されました
先頭の差分
- 空白の変更を無視
+ 空白の変更とEOLを無視
最後の差分
LFSオブジェクトの変更
次の差分
diff --git a/src/Resources/Locales/pt_BR.axaml b/src/Resources/Locales/pt_BR.axaml
index 3caac3cc..e78c1a36 100644
--- a/src/Resources/Locales/pt_BR.axaml
+++ b/src/Resources/Locales/pt_BR.axaml
@@ -216,7 +216,7 @@
ANTIGO
Copiar
Modo de Arquivo Alterado
- Ignorar mudanças de espaço em branco
+ Ignorar mudanças de espaço em branco e EOL
MUDANÇA DE OBJETO LFS
Próxima Diferença
SEM MUDANÇAS OU APENAS MUDANÇAS DE EOL
diff --git a/src/Resources/Locales/ru_RU.axaml b/src/Resources/Locales/ru_RU.axaml
index ee04f4d1..dd39b34f 100644
--- a/src/Resources/Locales/ru_RU.axaml
+++ b/src/Resources/Locales/ru_RU.axaml
@@ -246,7 +246,7 @@
Копировать
Режим файла изменён
Первое различие
- Игнорировать изменение пробелов
+ Игнорировать изменение пробелов и EOL
Последнее различие
ИЗМЕНЕНИЕ ОБЪЕКТА LFS
Следующее различие
diff --git a/src/Resources/Locales/ta_IN.axaml b/src/Resources/Locales/ta_IN.axaml
index 946a8d9c..30c2244b 100644
--- a/src/Resources/Locales/ta_IN.axaml
+++ b/src/Resources/Locales/ta_IN.axaml
@@ -240,7 +240,7 @@
நகல்
கோப்பு முறை மாற்றப்பட்டது
முதல் வேறுபாடு
- வெள்ளைவெளி மாற்றத்தை புறக்கணி
+ வெள்ளைவெளி மாற்றத்தை மற்றும் EOL புறக்கணி
கடைசி வேறுபாடு
பெகோஅ பொருள் மாற்றம்
அடுத்த வேறுபாடு
diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml
index 35a97b6e..d8b63422 100644
--- a/src/Resources/Locales/zh_CN.axaml
+++ b/src/Resources/Locales/zh_CN.axaml
@@ -245,7 +245,7 @@
复制
文件权限已变化
首个差异
- 忽略空白符号变化
+ 忽略空白符号变化和EOL
最后一个差异
LFS对象变更
下一个差异
diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml
index d71281f7..833e6610 100644
--- a/src/Resources/Locales/zh_TW.axaml
+++ b/src/Resources/Locales/zh_TW.axaml
@@ -245,7 +245,7 @@
複製
檔案權限已變更
第一個差異
- 忽略空白符號變化
+ 忽略空白符號變化和EOL
最後一個差異
LFS 物件變更
下一個差異
diff --git a/src/ViewModels/DiffContext.cs b/src/ViewModels/DiffContext.cs
index 6dd836bf..0feb7d77 100644
--- a/src/ViewModels/DiffContext.cs
+++ b/src/ViewModels/DiffContext.cs
@@ -207,7 +207,50 @@ namespace SourceGit.ViewModels
}
else
{
- rs = new Models.NoOrEOLChange();
+ // Check if old and new hashes differ but no text changes found
+ if (!string.IsNullOrEmpty(latest.OldHash) &&
+ !string.IsNullOrEmpty(latest.NewHash) &&
+ latest.OldHash != latest.NewHash)
+ {
+ // If hashes differ but no text diff found, it's likely an EOL change
+ // Create a text diff to show the file content
+ var textDiff = new Models.TextDiff()
+ {
+ Repo = _repo,
+ Option = _option,
+ File = _option.Path
+ };
+ // Query the file content to show
+ var fileContent = Commands.QueryFileContent.Run(_repo, "HEAD", _option.Path);
+ using var reader = new StreamReader(fileContent);
+ var line = string.Empty;
+ int lineNumber = 1;
+
+ while ((line = reader.ReadLine()) != null)
+ {
+ textDiff.Lines.Add(new Models.TextDiffLine(
+ Models.TextDiffLineType.Normal,
+ line,
+ lineNumber,
+ lineNumber));
+
+ lineNumber++;
+ }
+
+ if (textDiff.Lines.Count > 0)
+ {
+ textDiff.MaxLineNumber = lineNumber - 1;
+ rs = textDiff;
+ }
+ else
+ {
+ rs = new Models.NoOrEOLChange();
+ }
+ }
+ else
+ {
+ rs = new Models.NoOrEOLChange();
+ }
}
Dispatcher.UIThread.Post(() =>
diff --git a/src/Views/TextDiffView.axaml.cs b/src/Views/TextDiffView.axaml.cs
index 7ce9f288..fa065fed 100644
--- a/src/Views/TextDiffView.axaml.cs
+++ b/src/Views/TextDiffView.axaml.cs
@@ -745,6 +745,7 @@ namespace SourceGit.Views
var val = ShowHiddenSymbols;
Options.ShowTabs = val;
Options.ShowSpaces = val;
+ Options.ShowEndOfLine = val;
}
else if (change.Property == TabWidthProperty)
{