[binutils-gdb] binutils-gdb/git: Handle *.ac and *.m4 files in .gitattributes

Tom de Vries vries@sourceware.org
Thu Dec 18 09:00:59 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1b5496684056bce7e2910db0afc050f7b73e45d7

commit 1b5496684056bce7e2910db0afc050f7b73e45d7
Author: Tom de Vries <tdevries@suse.de>
Date:   Thu Dec 18 10:00:54 2025 +0100

    binutils-gdb/git: Handle *.ac and *.m4 files in .gitattributes
    
    Since commit 52ca3d3fe61 ("toplevel: unify the GCC and GDB/binutils .editorconfig
    files"), .editorconfig has settings for .ac and .m4 files:
    ...
    [*.{ac,m4}]
    indent_style = tab
    indent_size = 2
    trim_trailing_whitespace = true
    ...
    
    There are no setting for those files in .gitattributes, so the whitespace
    attribute defaults to trailing-space (shorthand for blank-at-eol,
    blank-at-eof) and space-before-tab.
    
    Since according to .editorconfig the indentation style is tab, add
    indent-with-non-tab as well.
    
    Since aclocal.m4 is generated, unset the whitespace attribute.  Likewise for
    configure.

Diff:
---
 .gitattributes | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/.gitattributes b/.gitattributes
index 6f7c6d8ba52..3639ebcfe55 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -33,3 +33,13 @@ ChangeLog       merge=merge-changelog
 *.[cChH] whitespace=space-before-tab,indent-with-non-tab,trailing-space
 *.exp whitespace=space-before-tab,indent-with-non-tab,trailing-space
 *.tcl whitespace=space-before-tab,indent-with-non-tab,trailing-space
+
+# Autoconf.
+
+*.ac	whitespace=space-before-tab,indent-with-non-tab,trailing-space
+*.m4	whitespace=space-before-tab,indent-with-non-tab,trailing-space
+
+# Generated files.
+
+configure   -whitespace
+aclocal.m4  -whitespace


More information about the Binutils-cvs mailing list