From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 91674D57A for ; Sat, 12 Nov 2016 21:51:25 +0100 (CET) Received: by mail-wm0-f49.google.com with SMTP id g23so35617705wme.1 for ; Sat, 12 Nov 2016 12:51:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=gD+KxwLfQbDRODNupl/fKoWNKcDb+q2b4oVlp73Ywg0=; b=JtGUJjgCAMcB60YCvusmV7cwfk8lj6n4qw0Mzpi55EP7zFMo3qD4cUbMEYXostt5bm VeCwMvzpxpIAIu1eRxyP/MHUuymDgAxYtU07hdqPdnZCIAdOgpwzmAIeeeRHNMbAKM24 d9F1vovrWnX8RzJ33Vwrj3VgoL2jOeLp8cNmEOde8aarv16w+HOByaY3K245Ey+bxoHS Qq89OvDhoixZ1SqCtrSYbDT/N+eD5zpymzO/mVvAhyYJOoqSVZqBya+tHMYjlkEPvUia H1PN2eQO8UM01Uu/0vEKWnGwrNNTshJ4bQESx7j0+z0h5h7zKofg7lEfog6HGoOGAFBU tQZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=gD+KxwLfQbDRODNupl/fKoWNKcDb+q2b4oVlp73Ywg0=; b=G7bDVuHMJGdNHMTytL0BnzK+fuezBiAxze//pcTMdK+8K4zPG4v6lJkImJ5MPj71lb /+/SbQK++GaNXoc4FTf3YqY2eOkBHcvlyDG3e+1r+TprJcxw86dnwgf/LzWANejl3ObK K8xCB1vi7w7FKzTTp4oGfcbANz0nFtOT240fszAIpB2szH7YIK7OT/Va/uEQvqvKmRRd jvPc8IMNj/Kzj1BU5O5MIkh7FPYwOu8vCga2OzCu3vC1tAdXFJ0zqOE8WWlT1KyuOYtq +8aqvo08rYiod9fgQSFryRJYPfmsMws+J3hcZ+PlABRJVnXbZAg3EeXiNuZLPaHlY7cK dzAQ== X-Gm-Message-State: ABUngvdTxP4dy9n2EZweGXl7VPCrlmrp6T/YFDUaTBxcs6yU+h7fqf5BlBVEnkdGTzvnS201 X-Received: by 10.28.22.193 with SMTP id 184mr3462859wmw.130.1478983885298; Sat, 12 Nov 2016 12:51:25 -0800 (PST) Received: from xps13.localnet (4.224.154.77.rev.sfr.net. [77.154.224.4]) by smtp.gmail.com with ESMTPSA id u17sm18628473wma.24.2016.11.12.12.51.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Nov 2016 12:51:24 -0800 (PST) From: Thomas Monjalon To: Ferruh Yigit Cc: dev@dpdk.org Date: Sat, 12 Nov 2016 21:51:21 +0100 Message-ID: <3760690.4pEarhzBJZ@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <59b9b8bf-1b90-8055-74f7-eecd6fe9c41a@intel.com> References: <1478706261-31261-1-git-send-email-thomas.monjalon@6wind.com> <1616077.gDs2nMcLPh@xps13> <59b9b8bf-1b90-8055-74f7-eecd6fe9c41a@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Sat, 12 Nov 2016 20:51:25 -0000 2016-11-11 17:28, Ferruh Yigit: > 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 Sometimes, less is more :)