File tree Expand file tree Collapse file tree 3 files changed +51
-6
lines changed Expand file tree Collapse file tree 3 files changed +51
-6
lines changed Original file line number Diff line number Diff line change 11# gitattributes
22# custom gitattributes
3- * .pdf diff =exif
43* .png diff =exif
5-
64* .dtd text
75* .html text diff =html
8- * .java text diff =java
96* .md text
10- * .nuspec text
11- * .rng text
12- * .rngc text
137* .sh eol =lf
148* .xml text
159* .xsd text
@@ -21,3 +15,11 @@ LICENSE* text
2115
2216* .docx diff =word
2317* .pdf filter =lfs diff =lfs merge =lfs - text
18+
19+ test / export-ignore
20+ /.github export-ignore
21+ /.editorconfig export-ignore
22+ /.gitattributes export-ignore
23+ /.gitignore export-ignore
24+
25+ /CHANGELOG.md merge =union
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+
5+ BINARY_FILES=" "
6+ CHANGED_FILES=$( git diff --cached --name-only --diff-filter=ACM)
7+ LFS_FILES=$( echo $CHANGED_FILES | xargs git check-attr filter | grep ' filter: lfs$' | sed -e ' s/: filter: lfs//' )
8+
9+ for FILE in $LFS_FILES ; do
10+ SOFT_SHA=$( git hash-object -w $FILE )
11+ RAW_SHA=$( git hash-object -w --no-filters $FILE )
12+
13+ if [ $SOFT_SHA == $RAW_SHA ]; then
14+ BINARY_FILES=" $FILE \n$BINARY_FILES "
15+ fi
16+ done
17+
18+ if [[ -n " $BINARY_FILES " ]]; then
19+ echo " Attention!"
20+ echo " ----------"
21+ echo " You tried to commit binary files:"
22+ echo -e " \x1B[31m$BINARY_FILES \x1B[0m"
23+ echo " Revert your changes and commit those files with git-lfs!"
24+ echo " ----------"
25+ exit 1
26+ fi
Original file line number Diff line number Diff line change 11* .sql
22* .zip
33* .tar
4+ * .tar.gz
5+ * .tar.lz4
6+ * .tgz
7+ * .7z
8+
49audit-trail /
10+ .DS_Store
11+ .AppleDouble
12+ .LSOverride
13+
14+ # ## MicrosoftOffice ###
15+ * .tmp
16+ ~$ * .doc *
17+ Backup of * .doc *
18+ ~$ * .xls *
19+ * .xlk
20+ ~$ * .ppt *
21+ * .~vsd *
You can’t perform that action at this time.
0 commit comments