From: Marc Branchaud Date: Fri, 07 Dec 2012 22:37:29 GMT Subject: Re: [PATCH] sh-setup: work around "unset IFS" bug in some shells Message-ID: <50C26FA9.6060007@xiplink.com> 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 > --- > 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 >