templates: add .gitattributes entry for sample hooks
The sample hooks are shell scripts but the filenames end with ".sample" so they need their own .gitattributes rule. Update our editorconfig settings to match the attributes as well. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Phillip Wood committed
Feb 13, 2026 at 14:34 UTC
046e1117d5d7ccb493ff8857876b05ac16453d43
2 files changed
+2
-1
.editorconfig
+1
-1
@@ -4,7 +4,7 @@ insert_final_newline = true
4
5
# The settings for C (*.c and *.h) files are mirrored in .clang-format. Keep
6
# them in sync.
7
-[{*.{c,h,sh,bash,perl,pl,pm,txt,adoc},config.mak.*,Makefile}]
7
+[{*.{c,h,sh,bash,perl,pl,pm,txt,adoc},config.mak.*,Makefile,templates/hooks/*.sample}]
8
indent_style = tab
9
tab_width = 8
10
.gitattributes
+1
@@ -18,3 +18,4 @@ CODE_OF_CONDUCT.md -whitespace
18
/Documentation/user-manual.adoc conflict-marker-size=32
19
/t/t????-*.sh conflict-marker-size=32
20
/t/unit-tests/clar/test/expected/* whitespace=-blank-at-eof
21
+/templates/hooks/*.sample whitespace=indent,trail,space,incomplete text eol=lf