qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] scripts: add "git.orderfile" for ordering diff hunks by pathname patterns
@ 2016-12-02 21:01 Laszlo Ersek
  2016-12-02 21:16 ` Eduardo Habkost
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Laszlo Ersek @ 2016-12-02 21:01 UTC (permalink / raw)
  To: qemu devel list
  Cc: Michael S. Tsirkin, Eric Blake, Fam Zheng, Gerd Hoffmann,
	John Snow, Max Reitz, Stefan Hajnoczi

When passed to git-diff (and to every other git command producing diffs
and/or diffstats) with "-O" or "diff.orderFile", this list of patterns
will place the more declarative / abstract hunks first, while changes to
imperative code / details will be near the end of the patches. This saves
on scrolling / searching and makes for easier reviewing.

We intend to advise contributors in the Wiki to run

  git config diff.orderFile scripts/git.orderfile

once, as part of their initial setup, before formatting their first (or,
for repeat contributors, next) patches.

See the "-O" option and the "diff.orderFile" configuration variable in
git-diff(1) and git-config(1).

Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Eric Blake <eblake@redhat.com>
Cc: Fam Zheng <famz@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: John Snow <jsnow@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---

Notes:
    v2:
    - "Makefile" -> "Makefile*" [Gerd]
    - add leading comment [Gerd]
    - add "docs/*" (note, there are *.txt files outside of docs/, so keeping
      those too) [Max, Fam, Eric]

 scripts/git.orderfile | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 scripts/git.orderfile

diff --git a/scripts/git.orderfile b/scripts/git.orderfile
new file mode 100644
index 000000000000..3cab16e0505c
--- /dev/null
+++ b/scripts/git.orderfile
@@ -0,0 +1,20 @@
+# Apply this diff order to your git configuration with the command
+#
+#   git config diff.orderFile scripts/git.orderfile
+
+docs/*
+*.txt
+configure
+GNUmakefile
+makefile
+Makefile*
+*.mak
+qapi-schema*.json
+qapi/*.json
+include/qapi/visitor.h
+include/qapi/visitor-impl.h
+scripts/qapi.py
+scripts/*.py
+*.h
+qapi/qapi-visit-core.c
+*.c
-- 
2.9.2

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

end of thread, other threads:[~2017-06-27 19:39 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-02 21:01 [Qemu-devel] [PATCH v2] scripts: add "git.orderfile" for ordering diff hunks by pathname patterns Laszlo Ersek
2016-12-02 21:16 ` Eduardo Habkost
2016-12-02 21:54   ` Laszlo Ersek
2016-12-02 22:40     ` John Snow
2016-12-04 17:33 ` Michael S. Tsirkin
2016-12-05  0:30   ` Fam Zheng
2016-12-05  3:00     ` Michael S. Tsirkin
2016-12-05 10:24   ` Laszlo Ersek
2016-12-05 16:30     ` Eric Blake
2016-12-05 18:45     ` John Snow
2016-12-05 16:27   ` Eric Blake
2017-02-07 19:20 ` Eric Blake
2017-02-08  0:53   ` Laszlo Ersek
2017-06-27 18:51 ` Emilio G. Cota
2017-06-27 19:16   ` Michael S. Tsirkin
2017-06-27 19:39     ` Emilio G. Cota

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).