From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id E7371D58A for ; Fri, 11 Nov 2016 17:21:23 +0100 (CET) Received: by mail-wm0-f45.google.com with SMTP id a197so434066878wmd.0 for ; Fri, 11 Nov 2016 08:21:23 -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=Xqbsbby9nhwLWp59UWl/vmPG71bii0bbE1qnyT3pP4I=; b=EDEcF6ISAWbEOdsaVSgaXo5XYqUkRKAwc6656DoR4Jmkah86F64WaP3MNAJ7Ob1n3Z NuGL1xF8p6r7koC5wPS3HDAKOCda0MDVxWpCK/QdUq3uPdGtF61xLViP5eCOSY2o2VXF pywXKxsG38CaRZ7P8uxIjubQFsv5uwAXskf0b2DYMxjm6C9aoyNruUSE4K5n/Vuyl0uc aW2eXBI/4o4j9OxIRHINDY1ixMKP8uZuJfJ4qUY53Xb8IJY8xnLIxOJevvk2BfwFZQOr 8vPl7K0iSTkm1vrLyH5fgirqkRFh8cENSW1OvjfLDmuGyrhEQ0EO9Y1aVt96wMipD4RD iF4w== 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=Xqbsbby9nhwLWp59UWl/vmPG71bii0bbE1qnyT3pP4I=; b=czuczTyRCIxzQC3UdMeVo6jU6eiAn2202lDGGh0SHRTRK7NnNTBSQealTVfqyjROyr zkoiZtuRyuvzT46mXp+Wg+BuhWfOaoaeMxt2h/+QC9tZIJd1XOsFnoeloYtrxQTRbrzb ze4Hzi0nOHJMcpuIJQpOfLdrD/gHz/KeGBiKetEkPOq9sxTOaXQB5kxvHK9yQoK6+bQJ xLeTap1RA0Y3BhnL4ZE2neBopBDwHCU+dqEWBCD7t68gO8TA6VkLpBZ1V7DlVulgzUea uv6RU88Soivh7lxrZel7sejnz5RcgK6vPVAfw/SE4PXiFHMJzwzEb8sg2ZLPkLdzdsrM zYRg== X-Gm-Message-State: ABUngvepOfrgmkvE45alVB7B04wDg5gwCVG0QCAiHrGvc4udYxX17ln5Ufm4nPOfnYKusm8v X-Received: by 10.28.217.131 with SMTP id q125mr13060620wmg.95.1478881283631; Fri, 11 Nov 2016 08:21:23 -0800 (PST) Received: from xps13.localnet (104.202.154.77.rev.sfr.net. [77.154.202.104]) by smtp.gmail.com with ESMTPSA id v10sm12242782wji.29.2016.11.11.08.21.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Nov 2016 08:21:23 -0800 (PST) From: Thomas Monjalon To: Ferruh Yigit Cc: dev@dpdk.org Date: Fri, 11 Nov 2016 17:21:21 +0100 Message-ID: <1616077.gDs2nMcLPh@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <969aae35-9129-d26c-70a7-fb61f0f985d1@intel.com> References: <1478706261-31261-1-git-send-email-thomas.monjalon@6wind.com> <969aae35-9129-d26c-70a7-fb61f0f985d1@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: Fri, 11 Nov 2016 16:21:24 -0000 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.