diff mbox series

[14/16] test-lib-functions: use "return 1" instead of "false"

Message ID patch-14.16-b6e9d971b40-20210412T110456Z-avarab@gmail.com (mailing list archive)
State Superseded
Headers show
Series test-lib.sh: new test_commit args, simplification & fixes | expand

Commit Message

Ævar Arnfjörð Bjarmason April 12, 2021, 11:09 a.m. UTC
Change a few functions that relied on a "false" being the last
statement in the function to use an explicit "return 1" like the other
functions in this file.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/test-lib-functions.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Junio C Hamano April 12, 2021, 7:31 p.m. UTC | #1
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> Change a few functions that relied on a "false" being the last
> statement in the function to use an explicit "return 1" like the other
> functions in this file.

While not wrong per-se, this and a few other changes in this series
are typical of your multi-patch series that unnecessarily consume
reviewer bandwidth that could be better spent on other more
important and correctness sensitive steps (like 07/16) in the same
series.

You should find a good balance to avoid wearing out and distracting
your reviewers---they are the most scarce resource around here that
must be shared by other people, not just with other topics of your
own.

Thanks.
diff mbox series

Patch

diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 2518a9b8274..c46bf0ff09c 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -763,7 +763,7 @@  test_path_is_file () {
 	if ! test -f "$1"
 	then
 		echo "File $1 doesn't exist"
-		false
+		return 1
 	fi
 }
 
@@ -772,7 +772,7 @@  test_path_is_dir () {
 	if ! test -d "$1"
 	then
 		echo "Directory $1 doesn't exist"
-		false
+		return 1
 	fi
 }
 
@@ -781,7 +781,7 @@  test_path_exists () {
 	if ! test -e "$1"
 	then
 		echo "Path $1 doesn't exist"
-		false
+		return 1
 	fi
 }
 
@@ -803,7 +803,7 @@  test_file_not_empty () {
 	if ! test -s "$1"
 	then
 		echo "'$1' is not a non-empty file."
-		false
+		return 1
 	fi
 }