From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH] improve git diff Date: Fri, 11 Nov 2016 11:22:06 +0000 Message-ID: <969aae35-9129-d26c-70a7-fb61f0f985d1@intel.com> References: <1478706261-31261-1-git-send-email-thomas.monjalon@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit To: Thomas Monjalon , dev@dpdk.org Return-path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 11ECE5591 for ; Fri, 11 Nov 2016 12:22:09 +0100 (CET) In-Reply-To: <1478706261-31261-1-git-send-email-thomas.monjalon@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 11/9/2016 3:44 PM, Thomas Monjalon wrote: > Sometimes git does not print the name of the function being changed > after @@. It happens especially after a goto label which is not indented. > Giving a hint about the languages of files .c, .h and .py > will improve hunk headers of "git diff" rendering. > > Signed-off-by: Thomas Monjalon > --- > .gitattributes | 3 +++ > 1 file changed, 3 insertions(+) > create mode 100644 .gitattributes > > diff --git a/.gitattributes b/.gitattributes > new file mode 100644 > index 0000000..fe555f8 > --- /dev/null > +++ b/.gitattributes > @@ -0,0 +1,3 @@ > +*.c diff=cpp > +*.h diff=cpp Can't git auto detect to use C/C++ language diff use for .c/.h files? Do you have a sample that generates bad hunk header, just to test? > +*.py diff=python >