]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
buildsys: Help git-diff adding .gitattributes config file
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Wed, 14 Oct 2020 08:22:09 +0000 (10:22 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 18 Nov 2020 08:33:16 +0000 (09:33 +0100)
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é <philmd@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20201014082209.3712625-1-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
.gitattributes [new file with mode: 0644]

diff --git a/.gitattributes b/.gitattributes
new file mode 100644 (file)
index 0000000..3d2fe2e
--- /dev/null
@@ -0,0 +1,2 @@
+*.c.inc         diff=c
+*.h.inc         diff=c