From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC9f9-0000qp-Rp for qemu-devel@nongnu.org; Wed, 30 Nov 2016 13:31:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cC9f8-0004Wb-Iq for qemu-devel@nongnu.org; Wed, 30 Nov 2016 13:31:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38012) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cC9f8-0004WA-Ct for qemu-devel@nongnu.org; Wed, 30 Nov 2016 13:31:22 -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 BDFEFC05AA57 for ; Wed, 30 Nov 2016 18:31:20 +0000 (UTC) Date: Wed, 30 Nov 2016 20:31:16 +0200 From: "Michael S. Tsirkin" Message-ID: <20161130202855-mutt-send-email-mst@kernel.org> References: <9151aa4b-44ed-ee0f-4dac-581931b3e899@redhat.com> <20161130170741-mutt-send-email-mst@kernel.org> <1638ba9d-8180-a3fe-7e80-9df43a04c8bd@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1638ba9d-8180-a3fe-7e80-9df43a04c8bd@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 04:26:14PM +0100, Laszlo Ersek wrote: > On 11/30/16 16:08, Michael S. Tsirkin wrote: > > 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? > > Might not be appropriate for QEMU indeed; I have that pattern because of > files in other projects. (Actually, thanks for drawing my attention to > it, because it should be *[Mm]akefile* :)) > > Thanks > Laszlo GNU make tries the following names, in order: 'GNUmakefile', 'makefile' and 'Makefile'. So I would make it just that: GNUmakefile makefile Makefile but we have helpers in .mak files so add *.mak > >> *.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