[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] buildsys: Help git-diff adding .gitattributes config file

From: Marc-André Lureau
Subject: Re: [PATCH] buildsys: Help git-diff adding .gitattributes config file
Date: Tue, 17 Nov 2020 19:38:25 +0400

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
We can help git-diff by providing attributes to the .[ch].inc path
names. See:

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

Marc-André Lureau

reply via email to

[Prev in Thread] Current Thread [Next in Thread]