[PATCH] sh-setup: Explicitly set IFS to its default, instead of unsetting it.
- From
marcnarc@xiplink.com <marcnarc@xiplink.com>
- Date
- Dec 7, 2012, 22:15 UTC
- Message-ID
- <1354918552-27150-1-git-send-email-marcnarc@xiplink.com>
- In-Reply-To
- <50C24ED7.90000@xiplink.com>
From: Marc Branchaud <marcnarc@xiplink.com>
Some sh implementations interpret "unset IFS" to mean IFS=''. This was seen in FreeBSD 7.2's sh.
We need to make sure IFS has its default value: <space><tab><newline>.
Signed-off-by: Marc Branchaud <marcnarc@xiplink.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..56e6498 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, except that some sh implementations interpret "unset IFS" +# as IFS='', so we need to set IFS explicitly to its POSIX default using +# literal <space><tab><newline> characters. +IFS=' +' git_broken_path_fix () { case ":$PATH:" in
-- 1.8.0.1