{"thread":{"id":"42798","subject":"[PATCH] .gitattributes: set file type for C files","startedAt":"2016-07-07T20:12:20Z","lastAt":"2016-07-07T20:12:20Z","messageCount":1,"participants":["René Scharfe"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"290978","messageId":"577EB786.7020806@web.de","threadId":"42798","inReplyTo":null,"subject":"[PATCH] .gitattributes: set file type for C files","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2016-07-07T20:11:50Z","receivedAt":"2016-07-07T20:12:20Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Set the diff attribute for C source file to \"cpp\" in order to improve\ngit's ability to determine hunk headers.  In particular it helps avoid\nshowing unindented labels in hunk headers.  That in turn is useful for\ngit diff -W and git grep -W, which show whole functions now instead of\nstopping at a label.\n\nSigned-off-by: Rene Scharfe <l.s.r@web.de>\n---\n .gitattributes | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/.gitattributes b/.gitattributes\nindex 5e98806..320e33c 100644\n--- a/.gitattributes\n+++ b/.gitattributes\n@@ -1,3 +1,3 @@\n * whitespace=!indent,trail,space\n-*.[ch] whitespace=indent,trail,space\n+*.[ch] whitespace=indent,trail,space diff=cpp\n *.sh whitespace=indent,trail,space\n-- \n2.9.0\n\n"}]}