]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/test-lib-functions.sh
Merge branch 'ds/bundle-uri-3'
[thirdparty/git.git] / t / test-lib-functions.sh
index 5d2f20983b876b1e4db89247fa3937defe1e8848..29d914a12ba170c30ba64c627a508a04dac239d4 100644 (file)
@@ -273,13 +273,13 @@ debug () {
 # <file>, <contents>, and <tag> all default to <message>.
 
 test_commit () {
-       notick= &&
-       echo=echo &&
-       append= &&
-       author= &&
-       signoff= &&
-       indir= &&
-       tag=light &&
+       local notick= &&
+       local echo=echo &&
+       local append= &&
+       local author= &&
+       local signoff= &&
+       local indir= &&
+       local tag=light &&
        while test $# != 0
        do
                case "$1" in
@@ -322,7 +322,7 @@ test_commit () {
                shift
        done &&
        indir=${indir:+"$indir"/} &&
-       file=${2:-"$1.t"} &&
+       local file=${2:-"$1.t"} &&
        if test -n "$append"
        then
                $echo "${3-$1}" >>"$indir$file"
@@ -897,7 +897,7 @@ test_path_is_symlink () {
 test_dir_is_empty () {
        test "$#" -ne 1 && BUG "1 param"
        test_path_is_dir "$1" &&
-       if test -n "$(ls -a1 "$1" | egrep -v '^\.\.?$')"
+       if test -n "$(ls -a1 "$1" | grep -E -v '^\.\.?$')"
        then
                echo "Directory '$1' is not empty, it contains:"
                ls -la "$1"