When creating a ChangeLog entry for *.m4 files, we should mention the Autoconf macro name. git's default heuristic is to look at the previous line that starts with a non-whitespace character. Unfortunately, in our *.m4 files, we have C code and changequotes command frequently indented at column 0; this kills the heuristic. This patch adds another heuristic, suitable for *.m4 files.
diff --git a/.gitattributes b/.gitattributes index 35a14df8a2..bad5997b57 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,3 +4,7 @@ ChangeLog merge=merge-changelog # Run this to make 'git diff' on texinfo files give nicer hunk context: # git config diff.texinfo.funcname '^@node[ ][ ]*\\([^,][^,]*\\)' *.texi* diff=texinfo + +# Run this to make 'git diff' on .m4 files give nicer hunk context: +# git config diff.m4.xfuncname '^((AC_DEFUN|m4_define)[^,)]*)' +*.m4 diff=m4
