Skip to content

Commit

Permalink
t/README: correct an exception when breaking a && chain in tests
Browse files Browse the repository at this point in the history
The correct advice should have been taken from c289c31 (t/t7006: ignore
return status of shell's unset builtin, 2010-06-02).  A real-life issue
we experienced was with "unset", not with "export" (exporting an
unset variable may have similar portability issues, though).

Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
jrn authored and gitster committed Jul 21, 2010
1 parent 77b5be2 commit bdcaa32
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions t/README
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,11 @@ Do:
test ...

That way all of the commands in your tests will succeed or fail. If
you must ignore the return value of something (e.g. the return
value of export is unportable) it's best to indicate so explicitly
with a semicolon:
you must ignore the return value of something (e.g., the return
after unsetting a variable that was already unset is unportable) it's
best to indicate so explicitly with a semicolon:

export HLAGH;
unset HLAGH;
git merge hla &&
git push gh &&
test ...
Expand Down

0 comments on commit bdcaa32

Please sign in to comment.