This website requires JavaScript.
Explore
Help
Sign In
mirrors
/
qemu
Watch
1
Star
0
Fork
0
You've already forked qemu
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
ae71d13d4e
qemu
/
.gitattributes
5 lines
100 B
Plaintext
Raw
Normal View
History
Unescape
Escape
buildsys: Help git-diff adding .gitattributes config file 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>
2020-10-14 11:22:09 +03:00
*.c.inc diff=c
*.h.inc diff=c
gitattributes: Cover Objective-C source files Apple's Git distribution actually carries a similar file which annotates *.m: https://github.com/apple-opensource/Git/blob/73/gitattributes See comments in commit 29cf16db23 ("buildsys: Help git-diff adding .gitattributes config file") for details. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com> Message-Id: <20220317130326.39188-1-philippe.mathieu.daude@gmail.com>
2022-03-17 15:57:28 +03:00
*.m diff=objc
maint: Tell git that *.py files should use python diff hunks Git's default hunk pattern recognizer favors the C language, but it also includes several built-in diff styles that give saner results in other languages. In particular, telling git to treat all .py files as python changes the beginning of diff hunks as follows: | --- a/python/qemu/machine.py | +++ b/python/qemu/machine.py | -@@ -337,12 +337,12 @@ class QEMUMachine: | +@@ -337,12 +337,12 @@ def _post_shutdown(self) -> None: | self._qmp.close() which makes it much easier to tell what function a patch is touching, rather than a non-descript listing of what class contains the changes. Sadly, our python files that don't use .py suffix (such as numerous iotests) do not benefit from this glob. Reported-by: John Snow <jsnow@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20210215222524.1820223-1-eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Signed-off-by: Cleber Rosa <crosa@redhat.com>
2021-02-16 01:25:24 +03:00
*.py diff=python
Reference in New Issue
Copy Permalink