From: Laszlo Ersek <lersek@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu devel list <qemu-devel@nongnu.org>,
Eric Blake <eblake@redhat.com>, Fam Zheng <famz@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>, John Snow <jsnow@redhat.com>,
Max Reitz <mreitz@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>
Subject: Re: [Qemu-devel] [PATCH v2] scripts: add "git.orderfile" for ordering diff hunks by pathname patterns
Date: Mon, 5 Dec 2016 11:24:33 +0100 [thread overview]
Message-ID: <d5a6c326-46b0-b9ab-084f-d45868b76006@redhat.com> (raw)
In-Reply-To: <20161204192953-mutt-send-email-mst@kernel.org>
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" <mst@redhat.com>
>> Cc: Eric Blake <eblake@redhat.com>
>> Cc: Fam Zheng <famz@redhat.com>
>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>> Cc: John Snow <jsnow@redhat.com>
>> Cc: Max Reitz <mreitz@redhat.com>
>> Cc: Stefan Hajnoczi <stefanha@gmail.com>
>> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
>> ---
>>
>> 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
next prev parent reply other threads:[~2016-12-05 10:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-02 21:01 [Qemu-devel] [PATCH v2] scripts: add "git.orderfile" for ordering diff hunks by pathname patterns Laszlo Ersek
2016-12-02 21:16 ` Eduardo Habkost
2016-12-02 21:54 ` Laszlo Ersek
2016-12-02 22:40 ` John Snow
2016-12-04 17:33 ` Michael S. Tsirkin
2016-12-05 0:30 ` Fam Zheng
2016-12-05 3:00 ` Michael S. Tsirkin
2016-12-05 10:24 ` Laszlo Ersek [this message]
2016-12-05 16:30 ` Eric Blake
2016-12-05 18:45 ` John Snow
2016-12-05 16:27 ` Eric Blake
2017-02-07 19:20 ` Eric Blake
2017-02-08 0:53 ` Laszlo Ersek
2017-06-27 18:51 ` Emilio G. Cota
2017-06-27 19:16 ` Michael S. Tsirkin
2017-06-27 19:39 ` Emilio G. Cota
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d5a6c326-46b0-b9ab-084f-d45868b76006@redhat.com \
--to=lersek@redhat.com \
--cc=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=jsnow@redhat.com \
--cc=kraxel@redhat.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).