]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb] Handle *.ac and *.m4 files in .gitattributes
authorTom de Vries <tdevries@suse.de>
Tue, 2 Dec 2025 19:52:18 +0000 (20:52 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 2 Dec 2025 19:52:18 +0000 (20:52 +0100)
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.

Probably, this eventually needs to be added to root level .gitattributes, but
for now try this in gdb*/.gitattributes.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/.gitattributes
gdbserver/.gitattributes
gdbsupport/.gitattributes

index 8acadb9813e8282c3d95ae03db3832585988f523..cf72455a48f7c2a6c82163b05020db99e25869d3 100644 (file)
@@ -5,3 +5,13 @@
 
 *.h    diff=cpp
 *.c    diff=cpp
+
+# 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
index 6df25746593839ba0b1aba9f0302dc91c831674e..fc269b48aed97d7da09bdc3a5cf0968ccc27e79d 100644 (file)
@@ -4,3 +4,13 @@
 # if you modify classes defined in a header file.
 
 *.h    diff=cpp
+
+# 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
index 6df25746593839ba0b1aba9f0302dc91c831674e..fc269b48aed97d7da09bdc3a5cf0968ccc27e79d 100644 (file)
@@ -4,3 +4,13 @@
 # if you modify classes defined in a header file.
 
 *.h    diff=cpp
+
+# 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