* [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
* Re: [PATCH] buildsys: Help git-diff adding .gitattributes config file
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
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-11-17 15:32 UTC (permalink / raw)
To: qemu-devel, Paolo Bonzini; +Cc: qemu-trivial
ping?
On 10/14/20 10:22 AM, Philippe Mathieu-Daudé wrote:
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] buildsys: Help git-diff adding .gitattributes config file
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
1 sibling, 0 replies; 3+ messages in thread
From: Marc-André Lureau @ 2020-11-17 15:38 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: qemu trival, Paolo Bonzini, QEMU
[-- Attachment #1: Type: text/plain, Size: 982 bytes --]
On Wed, Oct 14, 2020 at 12:25 PM Philippe Mathieu-Daudé <philmd@redhat.com>
wrote:
> 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>
> ---
> .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
>
>
>
--
Marc-André Lureau
[-- Attachment #2: Type: text/html, Size: 1832 bytes --]
^ permalink raw reply [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).