git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Branchaud <marcnarc@xiplink.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: 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 17:37:29 -0500	[thread overview]
Message-ID: <50C26FA9.6060007@xiplink.com> (raw)
In-Reply-To: <7va9tpfq46.fsf_-_@alter.siamese.dyndns.org>

I like your patch's subject line better than mine.

		M.


On 12-12-07 05:34 PM, Junio C Hamano wrote:
> With an unset IFS, field splitting is supposed to act as if IFS is
> set to the usual SP HT LF, but Marc Branchaud reports that the shell
> on FreeBSD 7.2 gets this wrong.
> 
> It is easy to set it to the default value manually, so let's do so.
> 
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>  git-sh-setup.sh | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/git-sh-setup.sh b/git-sh-setup.sh
> index ee0e0bc..107c144 100644
> --- a/git-sh-setup.sh
> +++ b/git-sh-setup.sh
> @@ -12,8 +12,11 @@
>  # But we protect ourselves from such a user mistake nevertheless.
>  unset CDPATH
>  
> -# Similarly for IFS
> -unset IFS
> +# 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=' 	
> +'
>  
>  git_broken_path_fix () {
>  	case ":$PATH:" in
> 

  reply	other threads:[~2012-12-07 22:37 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 [this message]
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               ` 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=50C26FA9.6060007@xiplink.com \
    --to=marcnarc@xiplink.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).