bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* simplifying the creation of ChangeLog entries
@ 2023-02-17 22:18 Bruno Haible
  0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2023-02-17 22:18 UTC (permalink / raw)
  To: bug-gnulib

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





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-17 22:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17 22:18 simplifying the creation of ChangeLog entries Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).