From patchwork Fri Dec 2 21:01:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 9459189 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 05D6B60515 for ; Fri, 2 Dec 2016 21:02:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDDFB284D5 for ; Fri, 2 Dec 2016 21:02:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D221C28535; Fri, 2 Dec 2016 21:02:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 45859284D5 for ; Fri, 2 Dec 2016 21:02:25 +0000 (UTC) Received: from localhost ([::1]:36450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCuyO-0001fK-BT for patchwork-qemu-devel@patchwork.kernel.org; Fri, 02 Dec 2016 16:02:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCuy8-0001es-DW for qemu-devel@nongnu.org; Fri, 02 Dec 2016 16:02:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cCuy5-000661-8l for qemu-devel@nongnu.org; Fri, 02 Dec 2016 16:02:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43728) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cCuy5-00065v-3d for qemu-devel@nongnu.org; Fri, 02 Dec 2016 16:02:05 -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 E8BE3C04D2A4; Fri, 2 Dec 2016 21:02:02 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-87.phx2.redhat.com [10.3.116.87]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uB2L1wDG010977; Fri, 2 Dec 2016 16:01:59 -0500 From: Laszlo Ersek To: qemu devel list Date: Fri, 2 Dec 2016 22:01:52 +0100 Message-Id: <20161202210152.6880-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 02 Dec 2016 21:02:03 +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 v2] 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" , Max Reitz , Gerd Hoffmann , Stefan Hajnoczi , John Snow Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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: Max Reitz Cc: Stefan Hajnoczi Signed-off-by: Laszlo Ersek Reviewed-by: John Snow --- Notes: v2: - "Makefile" -> "Makefile*" [Gerd] - add leading comment [Gerd] - add "docs/*" (note, there are *.txt files outside of docs/, so keeping those too) [Max, Fam, Eric] scripts/git.orderfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/git.orderfile diff --git a/scripts/git.orderfile b/scripts/git.orderfile new file mode 100644 index 000000000000..3cab16e0505c --- /dev/null +++ b/scripts/git.orderfile @@ -0,0 +1,20 @@ +# Apply this diff order to your git configuration with the command +# +# git config diff.orderFile scripts/git.orderfile + +docs/* +*.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