cgit

commit f8492f79a3b1193ae1a412eb7c4f3b0c2b21ecaa

Author: Ferry Huberts <ferry.huberts@pelagic.nl>

tests: handle paths with whitespace

v2: incorporate remarks of Lukas

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>

 tests/setup.sh | 2 +-
 tests/t0108-patch.sh | 2 +-


diff --git a/tests/setup.sh b/tests/setup.sh
index b9475a3996d0054aeee0e217d786197a34917b73..f5774e32c13c58b79fa50892e3f00d2e9877c379 100755
--- a/tests/setup.sh
+++ b/tests/setup.sh
@@ -41,7 +41,7 @@ 		git add a+b
 		git commit -m "add a+b"
 		git branch "1+2"
 	fi
-	cd $dir
+	cd "$dir"
 }
 
 setup_repos()




diff --git a/tests/t0108-patch.sh b/tests/t0108-patch.sh
index e608104733c299340c472eac9ed6e0408b966cd5..6ee70b31f7546ceecf7ab9b1dca1359955f0b8f6 100755
--- a/tests/t0108-patch.sh
+++ b/tests/t0108-patch.sh
@@ -25,7 +25,7 @@ 	 tail -1 trash/tmp | grep -e "^cgit"
 '
 
 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' '