Do not rely on the exit status of "unset" for unset variables
commit5188408057b31a604f00496582aa873054ad6746
authorH.Merijn Brand <h.m.brand@xs4all.nl>
Tue, 4 Dec 2007 22:45:16 +0000 (4 22:45 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 4 Dec 2007 22:48:45 +0000 (4 14:48 -0800)
treee753db084f0eb5b31fc9c61a972dc4f9d20eb9d0
parente5d3de5c457d1a82c921b9bf2cd9a962970ce30e
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>
git-submodule.sh
t/t0001-init.sh