The gcc-git-customization script sets up a diff hook to match (define as a function name hook so that diff -p style annotations will match a pattern name.

This patch does the other half of this in the gcc configuration by matching *.pd and *.md to this new rule

        * .gitattributes: Use the md diff rule for *.md and *.pd.

OK?

diff --git a/.gitattributes b/.gitattributes
index 13debfd97e9..4d6c031112c 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -4,3 +4,9 @@
 *.[cCh] whitespace=indent-with-non-tab,space-before-tab,trailing-space
 *.cc whitespace=indent-with-non-tab,space-before-tab,trailing-space
 ChangeLog whitespace=indent-with-non-tab,space-before-tab,trailing-space
+
+# match '(define_' as a function name for diff headers.
+# To use the following hook, you'll need to run:
+#   git config [--global] diff.md.xfuncname '\(define.*$'
+# contrib/gcc-git-customization.sh will do this for you.
+*.[mp]d	diff=md

Reply via email to