From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26266 invoked by alias); 15 Jan 2020 13:17:26 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 25544 invoked by uid 89); 15 Jan 2020 13:17:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,MEDICAL_SUBJECT,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Jan 2020 13:17:16 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8995131B; Wed, 15 Jan 2020 05:17:14 -0800 (PST) Received: from e120077-lin.cambridge.arm.com (e120077-lin.cambridge.arm.com [10.2.78.81]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EC9BE3F534; Wed, 15 Jan 2020 05:17:13 -0800 (PST) To: "gcc-patches@gcc.gnu.org" From: "Richard Earnshaw (lists)" Subject: Add attribute to match *.md and *.pd to the git diff hook Message-ID: <27ef914f-0968-62e4-0c42-aadf5bfb179b@arm.com> Date: Wed, 15 Jan 2020 13:24:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------E66E207BA8C09AB07CD45089" X-SW-Source: 2020-01/txt/msg00882.txt.bz2 This is a multi-part message in MIME format. --------------E66E207BA8C09AB07CD45089 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 332 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? --------------E66E207BA8C09AB07CD45089 Content-Type: text/x-patch; name="md-attributes.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="md-attributes.patch" Content-length: 599 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 --------------E66E207BA8C09AB07CD45089--