From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC6Uw-00080l-01 for qemu-devel@nongnu.org; Wed, 30 Nov 2016 10:08:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cC6Uv-00068t-4F for qemu-devel@nongnu.org; Wed, 30 Nov 2016 10:08:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58622) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cC6Uu-00068Y-Un for qemu-devel@nongnu.org; Wed, 30 Nov 2016 10:08:37 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 01DBB624C4 for ; Wed, 30 Nov 2016 15:08:36 +0000 (UTC) Date: Wed, 30 Nov 2016 17:08:31 +0200 From: "Michael S. Tsirkin" Message-ID: <20161130170741-mutt-send-email-mst@kernel.org> References: <9151aa4b-44ed-ee0f-4dac-581931b3e899@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9151aa4b-44ed-ee0f-4dac-581931b3e899@redhat.com> Subject: Re: [Qemu-devel] a suggestion to place *.c hunks last in patches List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: qemu devel list 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 > Output the patch in the order specified in the , > 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