From 4a2f472c7a265c841c2af5994520251fad056724 Mon Sep 17 00:00:00 2001 From: "J. Daniel Smith" Date: Mon, 9 Oct 2023 14:44:44 -0400 Subject: [PATCH 1/4] add extensions for .log and known Windows/Linux binaries (#746) --- .gitattributes | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitattributes b/.gitattributes index 6e07f483b..803f17ffe 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,10 +18,12 @@ CMakeLists.txt text eol=lf # Text file formats *.txt text eol=lf +*.text text eol=lf *.md text eol=lf *.tex text eol=lf *.?ml text eol=lf *.kmz binary +*.log text eol=lf # Programming languages *.htm? text eol=lf @@ -54,12 +56,21 @@ CMakeLists.txt text eol=lf ###################### # Known binary files +# executables, libraries; yes, sometimes they're part of a repository +*.exe binary +*.out binary +lib*.so* binary +*.dll binary +lib*.a* binary +*.lib binary + # from various unit_test/ directories *.dat binary *.*hdr binary *.flat binary *.sig binary *.bin binary +*.dump binary # images *.bmp binary From c3813bb29dece67b52a89f31133f872af36072b5 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Tue, 10 Oct 2023 10:23:30 -0400 Subject: [PATCH 2/4] eol=lf is the default --- .gitattributes | 96 +++++++++++++++++++++++++++++++------------------- 1 file changed, 59 insertions(+), 37 deletions(-) diff --git a/.gitattributes b/.gitattributes index 803f17ffe..cbe07367f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -16,42 +16,58 @@ CMakeLists.txt text eol=lf *.vcxproj.filters text eol=crlf *.ruleset text eol=crlf +# Python builds with WAF +wscript text +waf binary + # Text file formats -*.txt text eol=lf -*.text text eol=lf -*.md text eol=lf -*.tex text eol=lf -*.?ml text eol=lf +*.txt text +*.text text +*.md text diff=markdown +*.tex text +*.?ml text *.kmz binary -*.log text eol=lf +*.log text -# Programming languages -*.htm? text eol=lf -*.css text eol=lf -*.c text eol=lf -*.cc text eol=lf -*.c?? text eol=lf -*.c??m text eol=lf -*.ccm text eol=lf -*.C text eol=lf -*.h?? text eol=lf -*.h text eol=lf -*.hh text eol=lf -*.ixx text eol=lf -*.mpp text eol=lf -*.py text eol=lf +# Source code +*.htm? text +*.css text +*.c text +*.cc text +*.c?? text +*.c??m text +*.ccm text +*.C text +*.h?? text +*.h text +*.hh text +*.ixx text +*.mpp text +*.py text *.pyc binary # .f and .f90 -*.f* text eol=lf -*.m text eol=lf -*.java text eol=lf -*.cs text eol=lf -*.vb text eol=lf -*.js text eol=lf -*.ts text eol=lf -*.pl text eol=lf -*.sh text eol=lf -*.csh text eol=lf +*.f* text +*.m text +*.java text +*.cs text +*.vb text +*.js text +*.ts text +*.pl text +*.sh text +*.csh text +*.bash text +*.bat text eol=crlf +*.ps1 text +*.ipynb text + +# Serialization +*.json text +*.yaml text +*.yml text +*.xml text +*.xsd text +*.xslt text ###################### # Known binary files @@ -63,6 +79,7 @@ lib*.so* binary *.dll binary lib*.a* binary *.lib binary +*.mex binary # from various unit_test/ directories *.dat binary @@ -82,9 +99,9 @@ lib*.a* binary *.jpeg binary *.png binary # SVG images are XML -*.svg text eol=lf +*.svg text *.raw binary -*.hei* binary +*.hei? binary # music *.mp3 binary @@ -101,15 +118,20 @@ lib*.a* binary # documents *.pdf binary *.dvi binary -*.doc* binary -*.xls* binary -*.ppt* binary +*.doc binary +*.docx binary +*.csv text +*.xls binary +*.xlsx binary +*.ppt binary +*.pptx binary *.h5 binary *.sio binary *.ntf binary *.nitf binary -*.si?d binary +*.sidd binary +*.sicd? binary # containers *.zip binary From d00db384af0d045fd242cbbfb8cc4087e1b1d62c Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Tue, 10 Oct 2023 14:25:29 -0400 Subject: [PATCH 3/4] everything is text except for known binaries --- .gitattributes | 72 +++++++++----------------------------------------- 1 file changed, 13 insertions(+), 59 deletions(-) diff --git a/.gitattributes b/.gitattributes index cbe07367f..de6af9668 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,71 +7,23 @@ CMakeLists.txt text eol=lf # Modern tools on Windows can handle Linux LF # See https://stackoverflow.com/a/13154031/8877 for details -* text=auto eol=lf -.git?* text +* text=auto eol=lf +*.* text=auto eol=lf +.git?* text=auto eol=lf # Leave known Windows-only text files as CR/LF -*.sln text eol=crlf -*.vcxproj text eol=crlf -*.vcxproj.filters text eol=crlf -*.ruleset text eol=crlf - -# Python builds with WAF -wscript text -waf binary - -# Text file formats -*.txt text -*.text text -*.md text diff=markdown -*.tex text -*.?ml text -*.kmz binary -*.log text - -# Source code -*.htm? text -*.css text -*.c text -*.cc text -*.c?? text -*.c??m text -*.ccm text -*.C text -*.h?? text -*.h text -*.hh text -*.ixx text -*.mpp text -*.py text -*.pyc binary -# .f and .f90 -*.f* text -*.m text -*.java text -*.cs text -*.vb text -*.js text -*.ts text -*.pl text -*.sh text -*.csh text -*.bash text -*.bat text eol=crlf -*.ps1 text -*.ipynb text - -# Serialization -*.json text -*.yaml text -*.yml text -*.xml text -*.xsd text -*.xslt text +*.sln text eol=crlf +*.vcxproj text eol=crlf +*.vcxproj.filters text eol=crlf +*.ruleset text eol=crlf +*.bat text eol=crlf ###################### # Known binary files +# Python builds with WAF +waf binary + # executables, libraries; yes, sometimes they're part of a repository *.exe binary *.out binary @@ -80,6 +32,7 @@ lib*.so* binary lib*.a* binary *.lib binary *.mex binary +*.pyc binary # from various unit_test/ directories *.dat binary @@ -102,6 +55,7 @@ lib*.a* binary *.svg text *.raw binary *.hei? binary +*.kmz binary # music *.mp3 binary From c3fd20a88f75678a2a31c461ae40ca7cd00f3670 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Wed, 11 Oct 2023 07:52:51 -0400 Subject: [PATCH 4/4] added some OLD Visual Studio extensions HDR files are binary --- .gitattributes | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index de6af9668..c888454a3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,6 +13,9 @@ CMakeLists.txt text eol=lf # Leave known Windows-only text files as CR/LF *.sln text eol=crlf +*.dsw text eol=crlf +*.dsp text eol=crlf +*.vcproj text eol=crlf *.vcxproj text eol=crlf *.vcxproj.filters text eol=crlf *.ruleset text eol=crlf @@ -32,7 +35,7 @@ lib*.so* binary lib*.a* binary *.lib binary *.mex binary -*.pyc binary +*.pyc binary # from various unit_test/ directories *.dat binary @@ -74,14 +77,15 @@ lib*.a* binary *.dvi binary *.doc binary *.docx binary -*.csv text *.xls binary *.xlsx binary *.ppt binary *.pptx binary +# SAR *.h5 binary *.sio binary +*.hdr binary *.ntf binary *.nitf binary *.sidd binary