]> git.ipfire.org Git - thirdparty/git.git/commit
tests: apply modern idiom for exiting loop upon failure
authorEric Sunshine <sunshine@sunshineco.com>
Thu, 9 Dec 2021 05:11:10 +0000 (00:11 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Dec 2021 18:29:48 +0000 (10:29 -0800)
commit03949e33f58223dd2d8465f4dd8042e5e581fcef
treeb5d3ed0b3bc19d18309a7563e6045442bd2346fc
parent77b1d9f355b44b68b4bb08a8143d13330fe4c562
tests: apply modern idiom for exiting loop upon failure

Rather than maintaining a flag indicating a failure within a loop and
aborting the test when the loop ends if the flag is set, modern practice
is to signal the failure immediately by exiting the loop early via
`return 1` (or `exit 1` if inside a subshell). Simplify these loops by
following the modern idiom.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1050-large.sh
t/t5505-remote.sh
t/t9400-git-cvsserver-server.sh