public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Add attribute to match *.md and *.pd to the git diff hook
@ 2020-01-15 13:24 Richard Earnshaw (lists)
  2020-01-15 13:50 ` Richard Earnshaw (lists)
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Earnshaw (lists) @ 2020-01-15 13:24 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 332 bytes --]

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?


[-- Attachment #2: md-attributes.patch --]
[-- Type: text/x-patch, Size: 599 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Add attribute to match *.md and *.pd to the git diff hook
  2020-01-15 13:24 Add attribute to match *.md and *.pd to the git diff hook Richard Earnshaw (lists)
@ 2020-01-15 13:50 ` Richard Earnshaw (lists)
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw (lists) @ 2020-01-15 13:50 UTC (permalink / raw)
  To: gcc-patches

On 15/01/2020 13:17, Richard Earnshaw (lists) wrote:
> 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?
> 

Dropped.  Let's use Jakub's version.

R.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-15 13:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15 13:24 Add attribute to match *.md and *.pd to the git diff hook Richard Earnshaw (lists)
2020-01-15 13:50 ` Richard Earnshaw (lists)

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).