qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] a suggestion to place *.c hunks last in patches
@ 2016-11-30 10:08 Laszlo Ersek
  2016-11-30 10:55 ` Gerd Hoffmann
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Laszlo Ersek @ 2016-11-30 10:08 UTC (permalink / raw)
  To: qemu devel list

Recent git releases support the diff.orderFile permanent setting. (In
older releases, the -O option had to be specified on the command line,
or in aliases, for the same effect, which was quite inconvenient.) From
git-diff(1):

       -O<orderfile>
           Output the patch in the order specified in the <orderfile>,
           which has one shell glob pattern per line. This overrides
           the diff.orderFile configuration variable (see git-
           config(1)). To cancel diff.orderFile, use -O/dev/null.

In my experience, an order file such as:

configure
*Makefile*
*.json
*.txt
*.h
*.c

that is, a priority order that goes from
descriptive/declarative/abstract to imperative/specific works wonders
for reviewing.

Randomly picked example:

[Qemu-devel] [PATCH] virtio-gpu: track and limit host memory allocations
http://lists.nongnu.org/archive/html/qemu-devel/2016-11/msg05144.html

This patch adds several fields to several structures first, and then it
does things with those new fields. If you think about what the English
verb "to declare" means, it's clear you want to see the declaration
first (same as the compiler), and only then how the field is put to use.

Thanks!
Laszlo

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

end of thread, other threads:[~2016-12-02 10:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-30 10:08 [Qemu-devel] a suggestion to place *.c hunks last in patches Laszlo Ersek
2016-11-30 10:55 ` Gerd Hoffmann
2016-11-30 12:03   ` Laszlo Ersek
2016-11-30 12:27     ` Fam Zheng
2016-12-02 10:15       ` Laszlo Ersek
2016-11-30 12:29     ` Gerd Hoffmann
2016-11-30 15:36       ` Laszlo Ersek
2016-11-30 20:48     ` John Snow
2016-11-30 21:54       ` Laszlo Ersek
2016-12-02 10:23       ` Stefan Hajnoczi
2016-11-30 15:08 ` Michael S. Tsirkin
2016-11-30 15:26   ` Laszlo Ersek
2016-11-30 18:31     ` Michael S. Tsirkin
2016-11-30 15:35 ` Stefan Hajnoczi
2016-11-30 15:41 ` Eric Blake
2016-11-30 20:02   ` Laszlo Ersek

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