t: simplify loop exit-code status variables
commitc6587bddc4e8a3ee2eef98a0a5cf15542a9cc849
authorJeff King <peff@peff.net>
Wed, 25 Mar 2015 05:30:17 +0000 (25 01:30 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Mar 2015 19:49:33 +0000 (25 12:49 -0700)
treeda1d8467e0c8a0a20e838b7e067ba1be7d896640
parente6821d09e4655af94f9c8af07333ae710094996a
t: simplify loop exit-code status variables

Since shell loops may drop the exit code of failed commands
inside the loop, some tests try to keep track of the status
by setting a variable. This can end up cumbersome and hard
to read; it is much simpler to just exit directly from the
loop using "return 1" (since each case is either in a helper
function or inside a test snippet).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3060-ls-files-with-tree.sh
t/t3901-i18n-patch.sh