Skip to content

Commit cd4de93

Browse files
devzero2000gitster
authored andcommitted
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 <[email protected]> Reviewed-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 57b74cd commit cd4de93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/examples/git-repack.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ case ",$all_into_one," in
7676
existing="$existing $e"
7777
fi
7878
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"
8181
then
8282
# This may have arbitrary user arguments, so we
8383
# have to protect it against whitespace splitting

0 commit comments

Comments
 (0)