summaryrefslogtreecommitdiff
path: root/git-sh-setup.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-10 22:25:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-09-10 22:25:45 (GMT)
commit7cc51cfe5ebb4fc23221ebcb050b527b89ebc0bc (patch)
tree6f412ea2b0cabd569c877234cfc2816fb2f3e220 /git-sh-setup.sh
parent3f664638e5d5afa0982eaa14fec5df70be56d52b (diff)
parent785063e02bb249ef3a39db88575fe626b310d4a7 (diff)
downloadgit-7cc51cfe5ebb4fc23221ebcb050b527b89ebc0bc.zip
git-7cc51cfe5ebb4fc23221ebcb050b527b89ebc0bc.tar.gz
git-7cc51cfe5ebb4fc23221ebcb050b527b89ebc0bc.tar.bz2
Merge branch 'jc/maint-protect-sh-from-ifs' into maint-1.7.11
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
Diffstat (limited to 'git-sh-setup.sh')
-rw-r--r--git-sh-setup.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 770a86e..ee0e0bc 100644
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -9,8 +9,12 @@
# you would cause "cd" to be taken to unexpected places. If you
# like CDPATH, define it for your interactive shell sessions without
# exporting it.
+# But we protect ourselves from such a user mistake nevertheless.
unset CDPATH
+# Similarly for IFS
+unset IFS
+
git_broken_path_fix () {
case ":$PATH:" in
*:$1:*) : ok ;;