[dpdk-dev] [PATCH] improve git diff
ferruh.yigit at intel.com
Fri Nov 11 18:28:34 CET 2016
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 <thomas.monjalon at 6wind.com>
>>> --- /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?
> Yes, you'll find a lot of them with "git log -p | grep '@@.*:'"
> 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
More information about the dev