diff --git a/src/VREF/COUNT b/src/VREF/COUNT
index d5c3982..b82832e 100755
--- a/src/VREF/COUNT
+++ b/src/VREF/COUNT
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
 # TODO: convert to perl!
 
 # gitolite VREF to count number of changed/new files in a push
@@ -32,7 +32,7 @@ nf=
 # count files against all the other commits in the system not just $oldsha
 # (why?  consider what is $oldtree when you create a new branch, or what is
 # $oldsha when you update an old feature branch from master and then push it
-count=`git log --name-only $nf --format=%n $newtree --not --all | grep . | sort -u | wc -l`
+count=`git log --name-only $nf --format=%n $newtree --not --all | grep . | sort -u | perl -ne '}{print "$."'`
 
 [[ $count -gt $max ]] && {
     # count has been exceeded.  If $9 was NO_SIGNOFF there's still a chance
diff --git a/src/VREF/FILETYPE b/src/VREF/FILETYPE
index 2115a5c..824fb88 100755
--- a/src/VREF/FILETYPE
+++ b/src/VREF/FILETYPE
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
 # TODO: convert to perl!
 
 # gitolite VREF to find autogenerated files
diff --git a/t/0-me-first.t b/t/0-me-first.t
index dc8916b..950f22e 100755
--- a/t/0-me-first.t
+++ b/t/0-me-first.t
@@ -31,12 +31,13 @@ try "
     cd ..
     glt clone u1 file://aa u1aa;    ok;     /Cloning into 'u1aa'.../
                                             /warning: You appear to have cloned an empty repository/
-    ls -ald --time-style=long-iso u1aa;
-                                    ok;     /drwxr-xr-x 3 $ENV{USER} $ENV{USER} \\d+ 201.-..-.. ..:.. u1aa/
+    gls -ald --time-style=long-iso u1aa;
+                                    ok;     /drwxr-xr-x 3 $ENV{USER}/
+                                            /\\d+ 201.-..-.. ..:.. u1aa/
 
     # basic clone deny
     glt clone u4 file://aa u4aa;    !ok;    /R any aa u4 DENIED by fallthru/
-    ls -ald u4aa;                   !ok;    /ls: cannot access u4aa: No such file or directory/
+    gls -ald u4aa;                  !ok;    /ls: cannot access u4aa: No such file or directory/
 
     # basic push
     cd u1aa;                        ok
diff --git a/t/basic.t b/t/basic.t
index 3e8c3aa..db09f81 100755
--- a/t/basic.t
+++ b/t/basic.t
@@ -77,7 +77,7 @@ try "
                                         /fatal: The remote end hung up unexpectedly/
     CLONE u2 t1;                ok;     gsh
                                         /warning: You appear to have cloned an empty repository./
-    ls -al t1;                  ok;     /$ENV{USER}.*$ENV{USER}.*\.git/
+    ls -al t1;                  ok;     /$ENV{USER}.*\.git/
     cd t1;                      ok;
 
     # push
diff --git a/t/merge-check.t b/t/merge-check.t
index b2642ed..249926f 100755
--- a/t/merge-check.t
+++ b/t/merge-check.t
@@ -25,7 +25,7 @@ try "ADMIN_PUSH set1; !/FATAL/" or die text();
 
 try "
     cd ..
-    ls -al foo;         !ok;    /cannot access foo: No such file or directory/
+    gls -al foo;        !ok;    /cannot access foo: No such file or directory/
     glt clone u1 file:///foo
                         ok;     /Cloning into/
                                 /You appear to have cloned an empty/
@@ -34,7 +34,7 @@ try "
 try "
     cd foo;             ok
     ls -Al;             ok;     /\.git/
-    test-commit aa;     ok;     /1 files changed, 1 insertions/
+    test-commit aa;     ok;     /1 file changed, 1 insertion/
     tag start;          ok
     glt push u1 origin master
                         ok;     /new branch.*master.-..master/
diff --git a/t/vrefs-1.t b/t/vrefs-1.t
index bd5086b..79f749e 100755
--- a/t/vrefs-1.t
+++ b/t/vrefs-1.t
@@ -32,7 +32,7 @@ put "conf/gitolite.conf", "
 try "
     ADMIN_PUSH vr1a
     cd ..
-    ls -al foo;                 !ok;    /cannot access foo: No such file or directory/
+    gls -al foo;                !ok;    /cannot access foo: No such file or directory/
     CLONE u1 foo;               ok;     /Cloning into/
                                         /You appear to have cloned an empty/
     cd foo;                     ok
diff --git a/t/vrefs-2.t b/t/vrefs-2.t
index 6c53341..4f3a18c 100755
--- a/t/vrefs-2.t
+++ b/t/vrefs-2.t
@@ -32,11 +32,11 @@ try "
     ADMIN_PUSH vr2a
     cd ..
     # setup
-    ls -al foo;                 !ok;    /cannot access foo: No such file or directory/
+    gls -al foo;                 !ok;    /cannot access foo: No such file or directory/
     CLONE u1 foo;               ok;     /Cloning into/
                                         /You appear to have cloned an empty/
     cd foo;                     ok
-    ls -Al;                     ok;     /\.git/
+    gls -Al;                     ok;     /\.git/
 
     # u1 push 15 new files
     tc a b c d e f g h i j k l m n o
