qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] a suggestion to place *.c hunks last in patches


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] a suggestion to place *.c hunks last in patches
Date: Wed, 30 Nov 2016 17:08:31 +0200

On Wed, Nov 30, 2016 at 11:08:27AM +0100, Laszlo Ersek wrote:
> 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*

Why add the * before Makefile? In fact, why * after it?

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



reply via email to

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