Skip to content

Commit bdcaa32

Browse files
jrngitster
authored andcommitted
t/README: correct an exception when breaking a && chain in tests
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]>
1 parent 77b5be2 commit bdcaa32

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t/README

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,11 @@ Do:
259259
test ...
260260

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

266-
export HLAGH;
266+
unset HLAGH;
267267
git merge hla &&
268268
git push gh &&
269269
test ...

0 commit comments

Comments
 (0)