From: Junio C Hamano <gitster@pobox.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: "Martin Ågren" <martin.agren@gmail.com>,
"Alexander Pyhalov" <apyhalov@gmail.com>,
"Git Mailing List" <git@vger.kernel.org>
Subject: Re: t7005-editor.sh failure
Date: Wed, 26 Sep 2018 11:16:35 -0700 [thread overview]
Message-ID: <xmqqlg7oktto.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180926121107.GH27036@localhost> ("SZEDER Gábor"'s message of "Wed, 26 Sep 2018 14:11:07 +0200")
SZEDER Gábor <szeder.dev@gmail.com> writes:
> Having said all that, I didn't omit the quotes in 4362da078e with the
> above in mind; in fact I tend to use quotes even when they are
> unnecessary (e.g. in variable assignments: var="$1"), because unquoted
> variables and command substitutions freak me out before I can think
> through whether its safe to omit the quotes or not :)
I quote >"$file" (but not var=$var) because the CodingGuidelines
tells me to:
- Redirection operators should be written with space before, but no
space after them. In other words, write 'echo test >"$file"'
instead of 'echo test> $file' or 'echo test > $file'. Note that
even though it is not required by POSIX to double-quote the
redirection target in a variable (as shown above), our code does so
because some versions of bash issue a warning without the quotes.
;-)
> Sidenote: this test should use the write_script helper to create this
> editor script.
Good suggestion.
next prev parent reply other threads:[~2018-09-26 18:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 6:52 t7005-editor.sh failure Alexander Pyhalov
2018-09-26 7:59 ` Martin Ågren
2018-09-26 9:00 ` Alexander Pyhalov
2018-09-26 9:52 ` Martin Ågren
2018-09-26 10:02 ` Alexander Pyhalov
2018-09-26 11:59 ` Eric Sunshine
2018-09-26 13:23 ` Martin Ågren
2018-09-26 12:11 ` SZEDER Gábor
2018-09-26 16:14 ` [PATCH] t7005-editor: quote filename to fix whitespace-issue Martin Ågren
2018-09-26 18:14 ` Taylor Blau
2018-09-26 19:21 ` Jeff King
2018-09-26 18:16 ` Junio C Hamano [this message]
2018-09-26 19:16 ` t7005-editor.sh failure Junio C Hamano
2018-09-26 19:29 ` Andrei Rybak
2018-09-27 20:53 ` SZEDER Gábor
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=xmqqlg7oktto.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=apyhalov@gmail.com \
--cc=git@vger.kernel.org \
--cc=martin.agren@gmail.com \
--cc=szeder.dev@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).