]> git.ipfire.org Git - thirdparty/git.git/commitdiff
templates: add .gitattributes entry for sample hooks
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Fri, 13 Feb 2026 14:34:48 +0000 (14:34 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Feb 2026 17:26:11 +0000 (09:26 -0800)
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>
.editorconfig
.gitattributes

index 2d3929b5916a14fcad60f701e8be72dac3c5b2d5..6e4eaa8e955341da3408e2567d68ab9ed2d1a4db 100644 (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
 
index 38b1c52fe0e2309c3fe23cc85e8b2fb73f6a99d4..556322be01b4a837320c5dc26ad4af732cd1e978 100644 (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