Skip to content

Commit 6f34b79

Browse files
devzero2000gitster
authored andcommitted
contrib/examples/git-resolve.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 cd4de93 commit 6f34b79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/examples/git-resolve.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ case "$common" in
7676
2>/dev/null || continue
7777
# Count the paths that are unmerged.
7878
cnt=$(GIT_INDEX_FILE=$G git ls-files --unmerged | wc -l)
79-
if test $best_cnt -le 0 -o $cnt -le $best_cnt
79+
if test $best_cnt -le 0 || test $cnt -le $best_cnt
8080
then
8181
best=$c
8282
best_cnt=$cnt

0 commit comments

Comments
 (0)