Files
binutils-gdb/.gitattributes
Tom de Vries 1b54966840 binutils-gdb/git: Handle *.ac and *.m4 files in .gitattributes
Since commit 52ca3d3fe6 ("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.
2025-12-18 10:00:54 +01:00

46 lines
1.4 KiB
Plaintext

# -*- conf -*-
## Set merge driver for ChangeLog files
# See gnulib's lib/git-merge-changelog.c (or git-merge-changelog(1))
# for per-user setup instructions.
#
# The short version of this (optional) procedure is:
#
# (1) Install git-merge-changelog (this is the tricky part!)
#
# (2) Add something like the following to your ~/.gitconfig:
#
# [merge "merge-changelog"]
# name = GNU-style ChangeLog merge driver
# driver = git-merge-changelog %O %A %B
#
# (3) Enjoy mostly effortless ChangeLog merges, at least until the
# file gets renamed again ...
ChangeLog merge=merge-changelog
# Setup whitespace error detection.
#
# (1) Spaces before tabs,
#
# (2) Use of spaces where a tab should be used,
#
# (3) Trailing whitespace,
*.cxx whitespace=space-before-tab,indent-with-non-tab,trailing-space
*.cc whitespace=space-before-tab,indent-with-non-tab,trailing-space
*.cpp whitespace=space-before-tab,indent-with-non-tab,trailing-space
*.[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