author | H.Merijn Brand <h.m.brand@xs4all.nl> | |
Tue, 4 Dec 2007 22:45:16 +0000 (22:45 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 4 Dec 2007 22:48:45 +0000 (14:48 -0800) | ||
commit | 5188408057b31a604f00496582aa873054ad6746 | |
tree | e753db084f0eb5b31fc9c61a972dc4f9d20eb9d0 | tree | snapshot |
parent | e5d3de5c457d1a82c921b9bf2cd9a962970ce30e | commit | diff |
Do not rely on the exit status of "unset" for unset variables
POSIX says that exit status "0" means that "unset" successfully unset
the variable. However, it is kind of ambiguous if an environment
variable which was not set could be successfully unset.
At least the default shell on HP-UX insists on reporting an error in
such a case, so just ignore the exit status of "unset".
[Dscho: extended the patch to git-submodule.sh, as Junio realized that
this is the only other place where we check the exit status of "unset".]
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
POSIX says that exit status "0" means that "unset" successfully unset
the variable. However, it is kind of ambiguous if an environment
variable which was not set could be successfully unset.
At least the default shell on HP-UX insists on reporting an error in
such a case, so just ignore the exit status of "unset".
[Dscho: extended the patch to git-submodule.sh, as Junio realized that
this is the only other place where we check the exit status of "unset".]
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-submodule.sh | diff | blob | history | |
t/t0001-init.sh | diff | blob | history |