From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 9DC146CB3 for ; Fri, 11 Nov 2016 18:28:37 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP; 11 Nov 2016 09:28:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,621,1473145200"; d="scan'208";a="785359762" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.57]) ([10.237.220.57]) by FMSMGA003.fm.intel.com with ESMTP; 11 Nov 2016 09:28:35 -0800 To: Thomas Monjalon References: <1478706261-31261-1-git-send-email-thomas.monjalon@6wind.com> <969aae35-9129-d26c-70a7-fb61f0f985d1@intel.com> <1616077.gDs2nMcLPh@xps13> Cc: dev@dpdk.org From: Ferruh Yigit Message-ID: <59b9b8bf-1b90-8055-74f7-eecd6fe9c41a@intel.com> Date: Fri, 11 Nov 2016 17:28:34 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1616077.gDs2nMcLPh@xps13> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] improve git diff X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Nov 2016 17:28:38 -0000 On 11/11/2016 4:21 PM, Thomas Monjalon wrote: > 2016-11-11 11:22, Ferruh Yigit: >> 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 > [...] >>> --- /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? > > No > >> Do you have a sample that generates bad hunk header, just to test? > > Yes, you'll find a lot of them with "git log -p | grep '@@.*:'" > Example: > git show bb6722f | grep '@@.*:' > Without the patch, it is a goto label in the hunk header. > You are right, I was expecting better from git J