From: Eric Blake <eblake@redhat.com>
To: unai.martinezcorral@ehu.eus
Cc: riku.voipio@iki.fi, qemu-devel@nongnu.org,
Laurent Vivier <laurent@vivier.eu>
Subject: Re: [PATCH v8 1/9] qemu-binfmt-conf.sh: enforce safe style consistency
Date: Mon, 9 Mar 2020 13:32:35 -0500 [thread overview]
Message-ID: <daa79871-56eb-901f-0868-6e7edb7632e8@redhat.com> (raw)
In-Reply-To: <CAGZZdDEqW4wkqsrYHYPy5ex1jqn5AAdbb4S0uzjfegMvwDUXmA@mail.gmail.com>
On 3/9/20 1:20 PM, Unai Martinez Corral wrote:
> 2020/03/09 16:01, Eric Blake:
>
>> On 3/7/20 11:22 AM, Unai Martinez-Corral wrote:
>>> Spaces are added before '; then', for consistency.
>>
>> For consistency with what? This is not our prevailing style; as
>> evidenced by this pre-patch search:
>>
>> $ git grep 'if \[.*\];' | wc
>> 274 2186 18170
>> $ git grep 'if \[.*\] ;' | wc
>> 25 256 1573
>>
>> and you are diverging from the dominant pattern.
>>
>
> For consistency within the script that is being modified. I'm not trying to
> diverge, neither do I prefer any specific style.
Aha, I see what you were looking at: within the script itself, it was 10
'] ;' vs. 2 '];'. In which case, I'd recommend swapping the 10
instances over to be common with the rest of the code base, rather than
the 2 away from the rest of the code base but towards the rest of the
script.
> Although the style in the current master is not consistent, ' ; ' is
> significantly more frequent. When I was told to keep consistency in v2, I
> picked that because it was the most common.
> Anyway, I will push a new version where all these are changed to the
> dominant pattern outside of this script.
Good to hear.
>
>
>> This part, however, is good. Since one part is controversial, you may
>> want to split this into two patches, or even drop the reformatting part.
>>
>
> Since the current master is neither consistent nor coherent with the
> dominant pattern, I don't think I can drop the reformatting as long as I
> want to fulfill your requirements.
Splitting into two patches (one to fix '] ;' spacing, the other to add
'[ "x$..."' protection) is then the best course of action.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2020-03-09 18:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-07 17:22 [PATCH v8 1/9] qemu-binfmt-conf.sh: enforce safe style consistency Unai Martinez-Corral
2020-03-09 15:01 ` Eric Blake
2020-03-09 18:20 ` Unai Martinez Corral
2020-03-09 18:32 ` Eric Blake [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-03-07 17:04 [PATCH v8 0/9] qemu-binfmt-conf.sh unai.martinezcorral
2020-03-07 18:38 ` [PATCH v8 1/9] qemu-binfmt-conf.sh: enforce safe style consistency Unai Martinez-Corral
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=daa79871-56eb-901f-0868-6e7edb7632e8@redhat.com \
--to=eblake@redhat.com \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=unai.martinezcorral@ehu.eus \
/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).