[PATCH 05/19] contrib/examples/git-repack.sh: convert test -a/-o to && and ||
- From
Elia Pinto <gitter.spiros@gmail.com>
- Date
- May 20, 2014, 13:50 UTC
- Message-ID
- <1400593832-6510-6-git-send-email-gitter.spiros@gmail.com>
- In-Reply-To
- <1400593832-6510-1-git-send-email-gitter.spiros@gmail.com>
The interaction with unary operators and operator precedence for && and || are better known than -a and -o, and for that reason we prefer them. Replace all existing instances of -a and -o to save readers from the burden of thinking about such things.
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> --- contrib/examples/git-repack.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/examples/git-repack.sh b/contrib/examples/git-repack.sh index f312405..96e3fed 100755 --- a/contrib/examples/git-repack.sh +++ b/contrib/examples/git-repack.sh @@ -76,8 +76,8 @@ case ",$all_into_one," in existing="$existing $e" fi done - if test -n "$existing" -a -n "$unpack_unreachable" -a \ - -n "$remove_redundant" + if test -n "$existing" && test -n "$unpack_unreachable" && \ + test -n "$remove_redundant" then # This may have arbitrary user arguments, so we # have to protect it against whitespace splitting
-- 1.7.10.4