sh-setup: protect from exported IFS
authorJunio C Hamano <gitster@pobox.com>
Wed, 8 Aug 2012 19:08:17 +0000 (12:08 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 Aug 2012 21:36:33 +0000 (14:36 -0700)
Many scripted Porcelains rely on being able to split words at the
default $IFS characters, i.e. SP, HT and LF. If the user exports a
non-default IFS to the environment, what they read from plumbing
commands such as ls-files that use HT to delimit fields may not be
split in the way we expect.

Protect outselves by resetting it, just like we do so against CDPATH
exported to the environment.

Noticed by Andrew Dranse <adranse@oanda.com>.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found