contrib/examples/git-commit.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 0783df5d2603c97a481be839bdc65088787dde1b
1 file changed +2 -2
contrib/examples/git-commit.sh
+2 -2
@@ -51,7 +51,7 @@ run_status () {
51 export GIT_INDEX_FILE
52 fi
53
54 - if test "$status_only" = "t" -o "$use_status_color" = "t"; then
54 + if test "$status_only" = "t" || test "$use_status_color" = "t"; then
55 color=
56 else
57 color=--nocolor
@@ -296,7 +296,7 @@ t,,,[1-9]*)
296 die "No paths with -i does not make sense." ;;
297 esac
298
299 -if test ! -z "$templatefile" -a -z "$log_given"
299 +if test ! -z "$templatefile" && test -z "$log_given"
300 then
301 if test ! -f "$templatefile"
302 then