blame: default to HEAD in a bare repo when no start commit is given
[gitweb.git] / t / test-lib-functions.sh
index bbf68712ccce6556b92004f55a8de14216dd57ac..80402a428f7735a031658a904d4f623f38e43464 100644 (file)
@@ -120,13 +120,7 @@ remove_cr () {
 # If $1 is 'infinity', output forever or until the receiving pipe stops reading,
 # whichever comes first.
 generate_zero_bytes () {
-       perl -e 'if ($ARGV[0] == "infinity") {
-               while (-1) {
-                       print "\0"
-               }
-       } else {
-               print "\0" x $ARGV[0]
-       }' "$@"
+       test-tool genzeros "$@"
 }
 
 # In some bourne shell implementations, the "unset" builtin returns
@@ -1302,7 +1296,7 @@ test_set_port () {
                        port=$(($port + 10000))
                fi
                ;;
-       *[^0-9]*|0*)
+       *[!0-9]*|0*)
                error >&7 "invalid port number: $port"
                ;;
        *)