Skip to content

Commit

Permalink
buildsys: Help git-diff adding .gitattributes config file
Browse files Browse the repository at this point in the history
Since commits 0979ed0 ("meson: rename .inc.h files to .h.inc")
and 139c183 ("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>
  • Loading branch information
philmd authored and bonzini committed Nov 18, 2020
1 parent c6a89b4 commit 29cf16d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.c.inc diff=c
*.h.inc diff=c

0 comments on commit 29cf16d

Please sign in to comment.