Received: from eggs.gnu.org ([2001:4830:134:3::10]:41756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDqRu-0001fR-Cl for qemu-devel@nongnu.org; Mon, 05 Dec 2016 05:24:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDqRq-0007TE-Az for qemu-devel@nongnu.org; Mon, 05 Dec 2016 05:24:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38554) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cDqRq-0007T8-1n for qemu-devel@nongnu.org; Mon, 05 Dec 2016 05:24:38 -0500 References: <20161202210152.6880-1-lersek@redhat.com> <20161204192953-mutt-send-email-mst@kernel.org> From: Laszlo Ersek Message-ID: Date: Mon, 5 Dec 2016 11:24:33 +0100 MIME-Version: 1.0 In-Reply-To: <20161204192953-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] scripts: add "git.orderfile" for ordering diff hunks by pathname patterns List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu devel list , Eric Blake , Fam Zheng , Gerd Hoffmann , John Snow , Max Reitz , Stefan Hajnoczi On 12/04/16 18:33, Michael S. Tsirkin wrote: > On Fri, Dec 02, 2016 at 10:01:52PM +0100, Laszlo Ersek wrote: >> 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 >> --- >> >> 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/* > > do we need this now? .txt is just below. I covered this exact question in the Notes section of the patch (see above). > >> +*.txt >> +configure >> +GNUmakefile >> +makefile >> +Makefile* >> +*.mak > > do these rules apply in each directory? > I think they do but then I don't think we should list directories > below. I picked the below lines from Eric's feedback. >> +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 > > is the exact order or qapi files that important? > I'd rather we stuck to simple wildcards without > special casing visitors etc. Eric indicated this specific order was helpful for QAPI work. > >> +*.c >> -- >> 2.9.2 I'm concerned that we're getting into bikeshedding with this thread. I think it is counter-productive to try to get every minute detail "right" (for some definition of "right") in the initial commit. *Whatever* we commit at this point will be an improvement relative to the current status; for example, *.h *.c would be an improvement, simply by placing C source / implementation after headers. We don't need (and shouldn't try) to cover everything we can think of in this version. I suggest we go ahead with this posting (or v1), then people can submit whatever improvements they deem fit, from their personal experience. I think the initial version should be minimal and non-controversial. We've already spent a disproportionate amount of time discussing this item. Thanks Laszlo