Marc Branchaud [off-list ref] writes:
It's FreeBSD 7.2, which I know is an obsolete version but I'm not able to
upgrade the machine. I believe FreeBSD's sh is, or is derived from, dash.
Finally. Yes, as you suspected, I am perfectly fine to explicitly
set IFS to the default values.
I wanted to have specific names to write in the commit log message,
in-code comments and possibly release notes. That way, people can
decide if the issue affects them and they should upgrade once the
fix is made.
Hi Junio, Marc.
On 12/07/2012 10:08 PM, Junio C Hamano wrote:
Marc Branchaud [off-list ref] writes:
quoted
It's FreeBSD 7.2, which I know is an obsolete version but I'm not able to
upgrade the machine. I believe FreeBSD's sh is, or is derived from, dash.
Finally. Yes, as you suspected, I am perfectly fine to explicitly
set IFS to the default values.
I wanted to have specific names to write in the commit log message,
in-code comments and possibly release notes. That way, people can
decide if the issue affects them and they should upgrade once the
fix is made.
The Autoconf manual suggests against unsetting IFS instead of resetting
it to the default sequence for yet another reason: if IFS is unset, code
that tries to save and restore its value will incorrectly reset it to an
empty value, thus disabling field splitting:
unset IFS
# default separators used for field splitting
# ...
saved_IFS=$IFS
IFS=:
# code using the new IFS
IFS=$saved_IFS
# no field splitting performed from now on!
Not sure how this is relevant for the Git codebase, but maybe it is
something worth reporting in the commit message of a proposed patch.
Regards,
Stefano
Marc Branchaud [off-list ref] writes:
It's FreeBSD 7.2, which I know is an obsolete version but I'm not able to
upgrade the machine. I believe FreeBSD's sh is, or is derived from, dash.
Dash has been the default '/bin/sh' for Ubuntu for quite a long time
now[1] in spite of repeated reports of compatibility problems[2].
Phil
[1] https://wiki.ubuntu.com/DashAsBinSh
[2] https://bugs.launchpad.net/ubuntu/+source/dash/+bug/141481