Skip to content

Commit 72c4dbe

Browse files
committed
Merge branch 'jc/maint-protect-sh-from-ifs'
When the user exports a non-default IFS without HT, scripts that rely on being able to parse "ls-files -s | while read a b c..." start to fail. Protect them from such a misconfiguration. * jc/maint-protect-sh-from-ifs: sh-setup: protect from exported IFS
2 parents b49203b + 785063e commit 72c4dbe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

git-sh-setup.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@
99
# you would cause "cd" to be taken to unexpected places. If you
1010
# like CDPATH, define it for your interactive shell sessions without
1111
# exporting it.
12+
# But we protect ourselves from such a user mistake nevertheless.
1213
unset CDPATH
1314

15+
# Similarly for IFS
16+
unset IFS
17+
1418
git_broken_path_fix () {
1519
case ":$PATH:" in
1620
*:$1:*) : ok ;;

0 commit comments

Comments
 (0)