contrib/examples/git-repack.sh: avoid "test <cond> -a/-o <cond>"
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test <cond> && test <cond>" spawning one extra process by using a single "test <cond> -a <cond>" no longer exists. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elia Pinto committed
Jun 6, 2014 at 07:55 UTC
cd4de93f2e34ded30bd6b7a7352b45650ad81a83
1 file changed
+2
-2
contrib/examples/git-repack.sh
+2
-2
@@ -76,8 +76,8 @@ case ",$all_into_one," in
76
existing="$existing $e"
77
fi
78
done
79
- if test -n "$existing" -a -n "$unpack_unreachable" -a \
80
- -n "$remove_redundant"
79
+ if test -n "$existing" && test -n "$unpack_unreachable" && \
80
+ test -n "$remove_redundant"
81
then
82
# This may have arbitrary user arguments, so we
83
# have to protect it against whitespace splitting