git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Marc Branchaud <marcnarc@xiplink.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] sh-setup: work around "unset IFS" bug in some shells
Date: Fri, 07 Dec 2012 14:58:05 -0800	[thread overview]
Message-ID: <7v624dfp1e.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <m2fw3h8oja.fsf@igel.home> (Andreas Schwab's message of "Fri, 07 Dec 2012 23:50:49 +0100")

Andreas Schwab <schwab@linux-m68k.org> writes:

> Junio C Hamano <gitster@pobox.com> writes:
>
>> +# Similarly for IFS, but some shells (e.g. FreeBSD 7.2) are buggy and
>> +# do not equate an unset IFS with IFS with the default, so here is
>> +# an explicit SP HT LF.
>> +IFS=' 	
>> +'
>
> Trailing whitespace can easily get lost

The comment above the assingment spell the character names out for
that exact reason.  Honestly, I think

> IFS=' ''	''
> '

is a lot harder to read.  If we were writing in bash, we would
probably use $' \t\n' but because we aren't, the best you can do
with your approach is what you wrote, but it would make the reader
wonder what these empty '' are there for and how many spaces are in
between the ''<string here>'' pair.

In other words, I agree with your concerns, but I do not think your
rewrite helps very much.

  reply	other threads:[~2012-12-07 22:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-07 17:44 Weird problem with git-submodule.sh Marc Branchaud
2012-12-07 17:54 ` Junio C Hamano
2012-12-07 18:03   ` Marc Branchaud
2012-12-07 19:11     ` Junio C Hamano
2012-12-07 20:17       ` Marc Branchaud
2012-12-07 20:23         ` Junio C Hamano
2012-12-07 20:44           ` Marc Branchaud
2012-12-07 21:08             ` Junio C Hamano
2012-12-07 22:34               ` [PATCH] sh-setup: work around "unset IFS" bug in some shells Junio C Hamano
2012-12-07 22:37                 ` Marc Branchaud
2012-12-07 22:50                 ` Andreas Schwab
2012-12-07 22:58                   ` Junio C Hamano [this message]
2012-12-08  9:25                     ` Andreas Schwab
2012-12-09 21:05               ` Weird problem with git-submodule.sh Stefano Lattarini
2012-12-12 19:10                 ` Phil Hord
2012-12-12 19:44                   ` Junio C Hamano
2012-12-12 23:12                     ` Phil Hord
2012-12-07 21:01           ` Marc Branchaud
2012-12-07 22:15         ` [PATCH] sh-setup: Explicitly set IFS to its default, instead of unsetting it marcnarc

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=7v624dfp1e.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=marcnarc@xiplink.com \
    --cc=schwab@linux-m68k.org \
    /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).