All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Marc Branchaud <marcnarc@xiplink.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: Weird problem with git-submodule.sh
Date: Sun, 09 Dec 2012 22:05:04 +0100	[thread overview]
Message-ID: <50C4FD00.4010003@gmail.com> (raw)
In-Reply-To: <7vobi5fu3c.fsf@alter.siamese.dyndns.org>

Hi Junio, Marc.

On 12/07/2012 10:08 PM, Junio C Hamano wrote:
> Marc Branchaud <marcnarc@xiplink.com> writes:
> 
>> It's FreeBSD 7.2, which I know is an obsolete version but I'm not able to
>> upgrade the machine.  I believe FreeBSD's sh is, or is derived from, dash.
> 
> Finally.  Yes, as you suspected, I am perfectly fine to explicitly
> set IFS to the default values.
> 
> I wanted to have specific names to write in the commit log message,
> in-code comments and possibly release notes.  That way, people can
> decide if the issue affects them and they should upgrade once the
> fix is made.
>
The Autoconf manual suggests against unsetting IFS instead of resetting
it to the default sequence for yet another reason: if IFS is unset, code
that tries to save and restore its value will incorrectly reset it to an
empty value, thus disabling field splitting:

    unset IFS
    # default separators used for field splitting
    # ...
    saved_IFS=$IFS
    IFS=:
    # code using the new IFS
    IFS=$saved_IFS
    # no field splitting performed from now on!

Not sure how this is relevant for the Git codebase, but maybe it is
something worth reporting in the commit message of a proposed patch.

Regards,
  Stefano

  parent reply	other threads:[~2012-12-09 21:05 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
2012-12-08  9:25                     ` Andreas Schwab
2012-12-09 21:05               ` Stefano Lattarini [this message]
2012-12-12 19:10                 ` Weird problem with git-submodule.sh 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=50C4FD00.4010003@gmail.com \
    --to=stefano.lattarini@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=marcnarc@xiplink.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.