From ce67706037a2583157fcac4cbf6253fe0f1e5139 Mon Sep 17 00:00:00 2001 From: Nicholas Schwab Date: Wed, 7 Aug 2024 18:15:17 +0200 Subject: [PATCH 1/3] Set *.png and *.ico to be treated as binary files. The change b732beba6 makes all files text files and sets lf as eol. This will automatically change all files to have lf if they are touched by git (e.g. via git status). This change cannot be stashed and makes it hard to work with the repo (rebase and checkout don't really work). See also #6183. Here, we set the offending files (*.png and *.ico, but that might be more in the future) to be treated as binary files and not be changed by git. --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitattributes b/.gitattributes index f7192096..648c78ca 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,4 @@ llm/ext_server/* linguist-vendored * text eol=lf +*.png binary +*.ico binary From 67472e0e89f516ccfbfad2d11414aadf484b7642 Mon Sep 17 00:00:00 2001 From: Nicholas42 Date: Fri, 9 Aug 2024 13:41:20 +0200 Subject: [PATCH 2/3] Also flag *.icns as binary --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 648c78ca..baabd3c1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,4 @@ llm/ext_server/* linguist-vendored * text eol=lf *.png binary *.ico binary +*.icns binary From d4e640746469ac586f12b400384c4ae7354d9280 Mon Sep 17 00:00:00 2001 From: Nicholas Schwab Date: Fri, 9 Aug 2024 23:14:13 +0200 Subject: [PATCH 3/3] Restrict text files with explicit line feeds to *.go. This partially reverts b732beba6a919b852539bb344b05e25c6a7c3c90. It seems like explicitly setting all files to use line feeds was done due to issues with the go linter, hence it can be restricted to those files (https://github.com/ollama/ollama/pull/6235#issuecomment-2278745953). --- .gitattributes | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitattributes b/.gitattributes index baabd3c1..f1c8bcb4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,3 @@ llm/ext_server/* linguist-vendored -* text eol=lf -*.png binary -*.ico binary -*.icns binary +* text=auto +*.go text eol=lf