From: Tom de Vries Date: Tue, 2 Dec 2025 19:52:18 +0000 (+0100) Subject: [gdb] Handle *.ac and *.m4 files in .gitattributes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d140bf493c5bf18cbeae1d66d37d34b0173734d;p=thirdparty%2Fbinutils-gdb.git [gdb] 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. Probably, this eventually needs to be added to root level .gitattributes, but for now try this in gdb*/.gitattributes. Approved-By: Simon Marchi --- diff --git a/gdb/.gitattributes b/gdb/.gitattributes index 8acadb9813e..cf72455a48f 100644 --- a/gdb/.gitattributes +++ b/gdb/.gitattributes @@ -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 diff --git a/gdbserver/.gitattributes b/gdbserver/.gitattributes index 6df25746593..fc269b48aed 100644 --- a/gdbserver/.gitattributes +++ b/gdbserver/.gitattributes @@ -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 diff --git a/gdbsupport/.gitattributes b/gdbsupport/.gitattributes index 6df25746593..fc269b48aed 100644 --- a/gdbsupport/.gitattributes +++ b/gdbsupport/.gitattributes @@ -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