]> granicus.if.org Git - cgit/commitdiff
tests: handle paths with whitespace
authorFerry Huberts <ferry.huberts@pelagic.nl>
Sun, 18 Mar 2012 10:43:49 +0000 (11:43 +0100)
committerLars Hjemli <hjemli@gmail.com>
Sun, 18 Mar 2012 10:54:42 +0000 (10:54 +0000)
v2: incorporate remarks of Lukas

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
tests/setup.sh
tests/t0108-patch.sh

index b9475a3996d0054aeee0e217d786197a34917b73..f5774e32c13c58b79fa50892e3f00d2e9877c379 100755 (executable)
@@ -41,7 +41,7 @@ mkrepo() {
                git commit -m "add a+b"
                git branch "1+2"
        fi
-       cd $dir
+       cd "$dir"
 }
 
 setup_repos()
index e608104733c299340c472eac9ed6e0408b966cd5..6ee70b31f7546ceecf7ab9b1dca1359955f0b8f6 100755 (executable)
@@ -25,7 +25,7 @@ run_test 'find `cgit` signature' '
 '
 
 run_test 'find initial commit' '
-       root=$(git --git-dir=$PWD/trash/repos/foo/.git rev-list HEAD | tail -1)
+       root=$(git --git-dir="$PWD/trash/repos/foo/.git" rev-list HEAD | tail -1)
 '
 
 run_test 'generate patch for initial commit' '