parseopt: handle malformed --expire arguments more nicely
[gitweb.git] / contrib / examples / git-resolve.sh
index 8f98142f77b5d6eda44b301082da20604a893db0..3099dc851ac26a9280e7e6d1a73638c05d01cc17 100755 (executable)
@@ -41,7 +41,7 @@ fi
 
 case "$common" in
 "$merge")
-       echo "Already up-to-date. Yeeah!"
+       echo "Already up to date. Yeeah!"
        dropheads
        exit 0
        ;;
@@ -75,8 +75,8 @@ case "$common" in
                GIT_INDEX_FILE=$G git read-tree -m $c $head $merge \
                        2>/dev/null || continue
                # Count the paths that are unmerged.
-               cnt=`GIT_INDEX_FILE=$G git ls-files --unmerged | wc -l`
-               if test $best_cnt -le 0 -o $cnt -le $best_cnt
+               cnt=$(GIT_INDEX_FILE=$G git ls-files --unmerged | wc -l)
+               if test $best_cnt -le 0 || test $cnt -le $best_cnt
                then
                        best=$c
                        best_cnt=$cnt