qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] buildsys: Help git-diff adding .gitattributes config file
@ 2020-10-14  8:22 Philippe Mathieu-Daudé
  2020-11-17 15:32 ` Philippe Mathieu-Daudé
  2020-11-17 15:38 ` Marc-André Lureau
  0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-14  8:22 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini; +Cc: qemu-trivial, Philippe Mathieu-Daudé

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>
---
 .gitattributes | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 .gitattributes

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000000..3d2fe2ecda8
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+*.c.inc         diff=c
+*.h.inc         diff=c
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-17 15:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-14  8:22 [PATCH] buildsys: Help git-diff adding .gitattributes config file Philippe Mathieu-Daudé
2020-11-17 15:32 ` Philippe Mathieu-Daudé
2020-11-17 15:38 ` Marc-André Lureau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).