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>
This commit is contained in:
Phillip Wood
2026-02-13 14:34:48 +00:00
committed by Junio C Hamano
parent 67ad42147a
commit 046e1117d5
2 changed files with 2 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ insert_final_newline = true
# The settings for C (*.c and *.h) files are mirrored in .clang-format. Keep
# them in sync.
[{*.{c,h,sh,bash,perl,pl,pm,txt,adoc},config.mak.*,Makefile}]
[{*.{c,h,sh,bash,perl,pl,pm,txt,adoc},config.mak.*,Makefile,templates/hooks/*.sample}]
indent_style = tab
tab_width = 8

1
.gitattributes vendored
View File

@@ -18,3 +18,4 @@ CODE_OF_CONDUCT.md -whitespace
/Documentation/user-manual.adoc conflict-marker-size=32
/t/t????-*.sh conflict-marker-size=32
/t/unit-tests/clar/test/expected/* whitespace=-blank-at-eof
/templates/hooks/*.sample whitespace=indent,trail,space,incomplete text eol=lf