nvie / gitflow

Git extensions to provide high-level repository operations for Vincent Driessen's branching model.
http://nvie.com/posts/a-successful-git-branching-model/
Other
26.65k stars 2.67k forks source link

export POSIXLY_CORRECT considered harmful #289

Open mislav opened 11 years ago

mislav commented 11 years ago

In e1ec57d48ac5c234262d84469af56b00b38929ab this line was added:

export POSIXLY_CORRECT=1

And it probably fixed some issues in git-flow, but it causes breakages down the line. Specifically, when git-flow does git checkout, that can trigger post-checkout git hooks. Some people in Rubyland have hooks that integrate with some Ruby-specific tools, and have rbenv (written in bash) to manage them. Because rbenv uses a construct (process substitution) that's not posix-compatible, this environment variable causes it to fail.

This was discovered in sstephenson/rbenv#222

In summary, because there might be other shell scripts down the line, git-flow should not mess up the environment for them. I propose either removing the export, or using the setting:

set -o posix

/cc @Thiana

tejanium commented 4 years ago

This causing asdf to fail as well https://github.com/asdf-vm/asdf/issues/581