From: Jonathan Nieder <jrnieder@gmail.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Elia Pinto <gitter.spiros@gmail.com>,
"git@vger.kernel.org" <git@vger.kernel.org>,
Eric Sunshine <sunshine@sunshineco.com>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: Patch Series v3 for "use the $( ... ) construct for command substitution"
Date: Fri, 4 Apr 2014 11:12:15 -0700 [thread overview]
Message-ID: <20140404181215.GJ6851@google.com> (raw)
In-Reply-To: <vpqk3b56lik.fsf@anie.imag.fr>
Matthieu Moy wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>> If the script is "obviously correct" enough then there is no need
>> to manually go through 140 files after that point.
>
> The script cannot be "obviously correct", as there are a lot of
> potential corner-cases (nested `, nesting ` within ", comments, ...).
To be a devil's advocate for a moment:
* Comments are easy to detect. Remember, we are not trying to handle
some adversary sending arbitrary well-formed shell scripts but just
the git source code which already follows a consistent style. When
I search for /#.*/ in .sh files, every match except for
t/test-lib-functions.sh:output=`echo; echo "# Stderr is:"; cat "$stderr"`
(which contains a backtick before the # mark) is a comment.
* Nested ` is evil. A search for the string \' quickly finds them all,
and they are very very rare.
The only exception I see is git-svn tests, which independently of
everything else is an obvious thing to fix first.
* Nesting `` within double-quotes has the same semantics as $()
within quotes. I don't think that poses a problem.
[...]
>> If the only way to get this done is to actually manually review those
>> 140 files, I just don't think it's worth it.
>
> Honnestly, I went through the series once and it wasn't that painful.
It is not just the people on the list reviewing now but others in the
future wanting to understand whether it is safe to upgrade to a new
version or where a bug they have run into came from. The simpler we
can make the task of convincing oneself that the patch behaves as
described, the better.
140 patches worth of churn once every couple of years is not terrible,
but I really don't want to see this becoming a pattern. :/ And I
don't see how the upside in this example warrants it.
Hoping that clarifies,
Jonathan
next prev parent reply other threads:[~2014-04-04 18:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-04 16:52 Patch Series v3 for "use the $( ... ) construct for command substitution" Elia Pinto
2014-04-04 17:29 ` Jonathan Nieder
2014-04-04 17:40 ` Matthieu Moy
2014-04-04 18:12 ` Jonathan Nieder [this message]
2014-04-04 19:27 ` Junio C Hamano
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=20140404181215.GJ6851@google.com \
--to=jrnieder@gmail.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=gitter.spiros@gmail.com \
--cc=sunshine@sunshineco.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).