From 29cf16db23e605769f6d89c47a1d45ef3373b88e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 14 Oct 2020 10:22:09 +0200 Subject: [PATCH] buildsys: Help git-diff adding .gitattributes config file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since commits 0979ed017f0 ("meson: rename .inc.h files to .h.inc") and 139c1837db7 ("meson: rename included C source files to .c.inc") 'git-diff --function-context' stopped displaying C function context correctly. We can help git-diff by providing attributes to the .[ch].inc path names. See: https://git-scm.com/docs/gitattributes#_generating_diff_text Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Message-Id: <20201014082209.3712625-1-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..3d2fe2ecda --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.c.inc diff=c +*.h.inc diff=c