diff --git a/formatters/format-csharp.sh b/formatters/format-csharp.sh index c82fbc76a..0769ddcc7 100755 --- a/formatters/format-csharp.sh +++ b/formatters/format-csharp.sh @@ -12,6 +12,14 @@ if command -v dotnet &> /dev/null; then # Store original directory pushd "$dir" > /dev/null + # Ensure line endings are reset after checkout from default branch + git rm --cached -r ../spine-csharp/ + git rm --cached -r ../spine-monogame/ + git rm --cached -r ../spine-unity/ + git checkout HEAD -- ../spine-csharp/ + git checkout HEAD -- ../spine-monogame/ + git checkout HEAD -- ../spine-unity/ + cp .editorconfig ../spine-csharp/ 2>/dev/null || true cp .editorconfig ../spine-monogame/ 2>/dev/null || true cp .editorconfig ../spine-unity/ 2>/dev/null || true