Received: from eggs.gnu.org ([2001:4830:134:3::10]:40019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC1oa-0002jt-6C for qemu-devel@nongnu.org; Wed, 30 Nov 2016 05:08:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cC1oU-0007aU-Bn for qemu-devel@nongnu.org; Wed, 30 Nov 2016 05:08:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54838) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cC1oU-0007Zd-6H for qemu-devel@nongnu.org; Wed, 30 Nov 2016 05:08:30 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (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 1A0D6804FC for ; Wed, 30 Nov 2016 10:08:29 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-51.phx2.redhat.com [10.3.116.51]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAUA8S6J013504 for ; Wed, 30 Nov 2016 05:08:28 -0500 From: Laszlo Ersek Message-ID: <9151aa4b-44ed-ee0f-4dac-581931b3e899@redhat.com> Date: Wed, 30 Nov 2016 11:08:27 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] a suggestion to place *.c hunks last in patches List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 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* *.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