From patchwork Fri Dec 2 10:40:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 86268 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp192220qgi; Fri, 2 Dec 2016 02:41:49 -0800 (PST) X-Received: by 10.55.67.81 with SMTP id q78mr37223862qka.53.1480675309558; Fri, 02 Dec 2016 02:41:49 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id s28si2608119qte.238.2016.12.02.02.41.49 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 02 Dec 2016 02:41:49 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:33701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cClHp-0003D8-5W for patch@linaro.org; Fri, 02 Dec 2016 05:41:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cClGp-0002wD-R9 for qemu-devel@nongnu.org; Fri, 02 Dec 2016 05:40:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cClGm-0001jN-Jj for qemu-devel@nongnu.org; Fri, 02 Dec 2016 05:40:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41990) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cClGm-0001j4-Ea for qemu-devel@nongnu.org; Fri, 02 Dec 2016 05:40:44 -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 882824DD6F; Fri, 2 Dec 2016 10:40:43 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-74.phx2.redhat.com [10.3.116.74]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uB2Aef3u019055; Fri, 2 Dec 2016 05:40:41 -0500 From: Laszlo Ersek To: qemu devel list Date: Fri, 2 Dec 2016 11:40:37 +0100 Message-Id: <20161202104037.5456-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 02 Dec 2016 10:40:43 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] scripts: add "git.orderfile" for ordering diff hunks by pathname patterns X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , "Michael S. Tsirkin" , Stefan Hajnoczi , Gerd Hoffmann , John Snow Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When passed to git-diff (and to every other git command producing diffs and/or diffstats) with "-O" or "diff.orderFile", this list of patterns will place the more declarative / abstract hunks first, while changes to imperative code / details will be near the end of the patches. This saves on scrolling / searching and makes for easier reviewing. We intend to advise contributors in the Wiki to run git config diff.orderFile scripts/git.orderfile once, as part of their initial setup, before formatting their first (or, for repeat contributors, next) patches. See the "-O" option and the "diff.orderFile" configuration variable in git-diff(1) and git-config(1). Cc: "Michael S. Tsirkin" Cc: Eric Blake Cc: Fam Zheng Cc: Gerd Hoffmann Cc: John Snow Cc: Stefan Hajnoczi Signed-off-by: Laszlo Ersek --- Notes: I think I managed to incorporate everyone's feedback! scripts/git.orderfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 scripts/git.orderfile -- 2.9.2 diff --git a/scripts/git.orderfile b/scripts/git.orderfile new file mode 100644 index 000000000000..600a2e4fc540 --- /dev/null +++ b/scripts/git.orderfile @@ -0,0 +1,15 @@ +*.txt +configure +GNUmakefile +makefile +Makefile +*.mak +qapi-schema*.json +qapi/*.json +include/qapi/visitor.h +include/qapi/visitor-impl.h +scripts/qapi.py +scripts/*.py +*.h +qapi/qapi-visit-core.c +*.c