{"thread":{"id":"13220","subject":"[PATCH] Have tests and programs understand paths containing spaces","startedAt":"2008-04-22T21:28:01Z","lastAt":"2008-04-23T07:13:04Z","messageCount":3,"participants":["Arjen Laarhoven","Dmitry Potapov","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"75012","messageId":"20080422212801.GB20417@regex.yaph.org","threadId":"13220","inReplyTo":null,"subject":"[PATCH] Have tests and programs understand paths containing spaces","fromName":"Arjen Laarhoven","fromEmail":"arjen@yaph.org","sentAt":"2008-04-22T21:28:01Z","receivedAt":"2008-04-22T21:28:01Z","isPatch":true,"sender":{"key":"arjen@yaph.org","avatar":"https://gravatar.com/avatar/f776c2c0c5ea62d70827b942eb7d95ce85661a3d70bc3f03cf9773815c599c01?d=mp&s=160"},"body":"A lot of tests and some core programs didn't work when used in a path\ncontaining whitespace.  Correct the quoting of all affected programs to\nfix this.\n\nSigned-off-by: Arjen Laarhoven <arjen@yaph.org>\n---\n builtin-tag.c                                |    2 +-\n git-rebase.sh                                |    2 +-\n git-send-email.perl                          |    2 +-\n git-sh-setup.sh                              |    2 +-\n t/lib-git-svn.sh                             |    8 ++--\n t/t0000-basic.sh                             |    2 +-\n t/t1020-subdirectory.sh                      |   22 ++++++------\n t/t3050-subprojects-fetch.sh                 |    2 +-\n t/t3404-rebase-interactive.sh                |    2 +-\n t/t5500-fetch-pack.sh                        |    2 +-\n t/t5512-ls-remote.sh                         |    2 +-\n t/t5516-fetch-push.sh                        |   10 +++---\n t/t5700-clone-reference.sh                   |    4 +-\n t/t7003-filter-branch.sh                     |    4 +-\n t/t7005-editor.sh                            |    4 +-\n t/t7010-setup.sh                             |    2 +-\n t/t7300-clean.sh                             |    2 +-\n t/t7501-commit.sh                            |    8 ++--\n t/t9001-send-email.sh                        |    4 +-\n t/t9100-git-svn-basic.sh                     |   26 +++++++-------\n t/t9101-git-svn-props.sh                     |    6 ++--\n t/t9102-git-svn-deep-rmdir.sh                |    6 ++--\n t/t9103-git-svn-tracked-directory-removed.sh |   10 +++---\n t/t9104-git-svn-follow-parent.sh             |   50 +++++++++++++-------------\n t/t9105-git-svn-commit-diff.sh               |   10 +++---\n t/t9106-git-svn-commit-diff-clobber.sh       |   14 ++++----\n t/t9106-git-svn-dcommit-clobber-series.sh    |    6 ++--\n t/t9107-git-svn-migrate.sh                   |   48 ++++++++++++------------\n t/t9108-git-svn-glob.sh                      |    8 ++--\n t/t9110-git-svn-use-svm-props.sh             |    8 ++--\n t/t9111-git-svn-use-svnsync-props.sh         |    8 ++--\n t/t9112-git-svn-md5less-file.sh              |    4 +-\n t/t9113-git-svn-dcommit-new-file.sh          |    6 ++--\n t/t9114-git-svn-dcommit-merge.sh             |    4 +-\n t/t9115-git-svn-dcommit-funky-renames.sh     |    4 +-\n t/t9116-git-svn-log.sh                       |    4 +-\n t/t9117-git-svn-init-clone.sh                |   10 +++---\n t/t9121-git-svn-fetch-renamed-dir.sh         |    4 +-\n t/t9400-git-cvsserver-server.sh              |   20 +++++-----\n t/t9500-gitweb-standalone-no-errors.sh       |    4 +-\n t/t9600-cvsimport.sh                         |    6 ++--\n t/test-lib.sh                                |   10 +++---\n 42 files changed, 181 insertions(+), 181 deletions(-)\n\ndiff --git a/builtin-tag.c b/builtin-tag.c\nindex 129ff57..2d04d4f 100644\n--- a/builtin-tag.c\n+++ b/builtin-tag.c\n@@ -55,7 +55,7 @@ void launch_editor(const char *path, struct strbuf *buffer, const char *const *e\n \t\tstrbuf_init(&arg0, 0);\n \t\tif (strcspn(editor, \"$ \\t'\") != len) {\n \t\t\t/* there are specials */\n-\t\t\tstrbuf_addf(&arg0, \"%s \\\"$@\\\"\", editor);\n+\t\t\tstrbuf_addf(&arg0, \"'%s' \\\"$@\\\"\", editor);\n \t\t\targs[i++] = \"sh\";\n \t\t\targs[i++] = \"-c\";\n \t\t\targs[i++] = arg0.buf;\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex 9b13b83..c43afe5 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -214,7 +214,7 @@ do\n \t\telse\n \t\t\tdie \"No rebase in progress?\"\n \t\tfi\n-\t\tgit reset --hard $(cat $dotest/orig-head)\n+\t\tgit reset --hard $(cat \"$dotest/orig-head\")\n \t\trm -r \"$dotest\"\n \t\texit\n \t\t;;\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 9e568bf..40a521a 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -512,7 +512,7 @@ EOT\n \tclose(C);\n \n \tmy $editor = $ENV{GIT_EDITOR} || Git::config(@repo, \"core.editor\") || $ENV{VISUAL} || $ENV{EDITOR} || \"vi\";\n-\tsystem('sh', '-c', '$0 $@', $editor, $compose_filename);\n+\tsystem('sh', '-c', '\"$0\" $@', $editor, $compose_filename);\n \n \topen(C2,\">\",$compose_filename . \".final\")\n \t\tor die \"Failed to open $compose_filename.final : \" . $!;\ndiff --git a/git-sh-setup.sh b/git-sh-setup.sh\nindex a44b1c7..a8a024b 100755\n--- a/git-sh-setup.sh\n+++ b/git-sh-setup.sh\n@@ -73,7 +73,7 @@ git_editor() {\n \t\texit 1\n \t\t;;\n \tesac\n-\teval \"${GIT_EDITOR:=vi}\" '\"$@\"'\n+\teval '\"${GIT_EDITOR:=vi}\"' '\"$@\"'\n }\n \n is_bare_repository () {\ndiff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh\nindex 9decd2e..f6645f9 100644\n--- a/t/lib-git-svn.sh\n+++ b/t/lib-git-svn.sh\n@@ -7,9 +7,9 @@ then\n \texit\n fi\n \n-GIT_DIR=$PWD/.git\n-GIT_SVN_DIR=$GIT_DIR/svn/git-svn\n-SVN_TREE=$GIT_SVN_DIR/svn-tree\n+GIT_DIR=\"$PWD/.git\"\n+GIT_SVN_DIR=\"$GIT_DIR/svn/git-svn\"\n+SVN_TREE=\"$GIT_SVN_DIR/svn-tree\"\n \n svn >/dev/null 2>&1\n if test $? -ne 1\n@@ -19,7 +19,7 @@ then\n     exit\n fi\n \n-svnrepo=$PWD/svnrepo\n+svnrepo=\"$PWD/svnrepo\"\n \n perl -w -e \"\n use SVN::Core;\ndiff --git a/t/t0000-basic.sh b/t/t0000-basic.sh\nindex 27b54cb..e6fa7de 100755\n--- a/t/t0000-basic.sh\n+++ b/t/t0000-basic.sh\n@@ -305,7 +305,7 @@ test_expect_success 'absolute path works as expected' '\n \tfile=\"$dir\"/index &&\n \ttest \"$file\" = \"$(test-absolute-path $dir2/index)\" &&\n \tbasename=blub &&\n-\ttest \"$dir/$basename\" = $(cd .git && test-absolute-path $basename) &&\n+\ttest \"$dir/$basename\" = \"$(cd .git && test-absolute-path $basename)\" &&\n \tln -s ../first/file .git/syml &&\n \tsym=\"$(cd first; pwd -P)\"/file &&\n \ttest \"$sym\" = \"$(test-absolute-path $dir2/syml)\"\ndiff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh\nindex b9cef34..5ed7fa4 100755\n--- a/t/t1020-subdirectory.sh\n+++ b/t/t1020-subdirectory.sh\n@@ -21,7 +21,7 @@ LF='\n '\n \n test_expect_success 'update-index and ls-files' '\n-\tcd $HERE &&\n+\tcd \"$HERE\" &&\n \tgit update-index --add one &&\n \tcase \"`git ls-files`\" in\n \tone) echo ok one ;;\n@@ -41,7 +41,7 @@ test_expect_success 'update-index and ls-files' '\n '\n \n test_expect_success 'cat-file' '\n-\tcd $HERE &&\n+\tcd \"$HERE\" &&\n \ttwo=`git ls-files -s dir/two` &&\n \ttwo=`expr \"$two\" : \"[0-7]* \\\\([0-9a-f]*\\\\)\"` &&\n \techo \"$two\" &&\n@@ -54,7 +54,7 @@ test_expect_success 'cat-file' '\n rm -f actual dir/actual\n \n test_expect_success 'diff-files' '\n-\tcd $HERE &&\n+\tcd \"$HERE\" &&\n \techo a >>one &&\n \techo d >>dir/two &&\n \tcase \"`git diff-files --name-only`\" in\n@@ -74,7 +74,7 @@ test_expect_success 'diff-files' '\n '\n \n test_expect_success 'write-tree' '\n-\tcd $HERE &&\n+\tcd \"$HERE\" &&\n \ttop=`git write-tree` &&\n \techo $top &&\n \tcd dir &&\n@@ -84,7 +84,7 @@ test_expect_success 'write-tree' '\n '\n \n test_expect_success 'checkout-index' '\n-\tcd $HERE &&\n+\tcd \"$HERE\" &&\n \tgit checkout-index -f -u one &&\n \tcmp one original.one &&\n \tcd dir &&\n@@ -93,7 +93,7 @@ test_expect_success 'checkout-index' '\n '\n \n test_expect_success 'read-tree' '\n-\tcd $HERE &&\n+\tcd \"$HERE\" &&\n \trm -f one dir/two &&\n \ttree=`git write-tree` &&\n \tgit read-tree --reset -u \"$tree\" &&\n@@ -107,27 +107,27 @@ test_expect_success 'read-tree' '\n '\n \n test_expect_success 'no file/rev ambiguity check inside .git' '\n-\tcd $HERE &&\n+\tcd \"$HERE\" &&\n \tgit commit -a -m 1 &&\n-\tcd $HERE/.git &&\n+\tcd \"$HERE/.git\" &&\n \tgit show -s HEAD\n '\n \n test_expect_success 'no file/rev ambiguity check inside a bare repo' '\n-\tcd $HERE &&\n+\tcd \"$HERE\" &&\n \tgit clone -s --bare .git foo.git &&\n \tcd foo.git && GIT_DIR=. git show -s HEAD\n '\n \n # This still does not work as it should...\n : test_expect_success 'no file/rev ambiguity check inside a bare repo' '\n-\tcd $HERE &&\n+\tcd \"$HERE\" &&\n \tgit clone -s --bare .git foo.git &&\n \tcd foo.git && git show -s HEAD\n '\n \n test_expect_success 'detection should not be fooled by a symlink' '\n-\tcd $HERE &&\n+\tcd \"$HERE\" &&\n \trm -fr foo.git &&\n \tgit clone -s .git another &&\n \tln -s another yetanother &&\ndiff --git a/t/t3050-subprojects-fetch.sh b/t/t3050-subprojects-fetch.sh\nindex 2b21b10..4261e96 100755\n--- a/t/t3050-subprojects-fetch.sh\n+++ b/t/t3050-subprojects-fetch.sh\n@@ -20,7 +20,7 @@ test_expect_success setup '\n '\n \n test_expect_success clone '\n-\tgit clone file://`pwd`/.git cloned &&\n+\tgit clone \"file://$(pwd)/.git\" cloned &&\n \t(git rev-parse HEAD; git ls-files -s) >expected &&\n \t(\n \t\tcd cloned &&\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex 9cf873f..e619a29 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -174,7 +174,7 @@ test_expect_success 'squash' '\n \ttest_tick &&\n \tGIT_AUTHOR_NAME=\"Nitfol\" git commit -m \"nitfol\" file7 &&\n \techo \"******************************\" &&\n-\tFAKE_LINES=\"1 squash 2\" git rebase -i --onto master HEAD~2 &&\n+\tFAKE_LINES=\"1 squash 2\" git rebase -v -i --onto master HEAD~2 &&\n \ttest B = $(cat file7) &&\n \ttest $(git rev-parse HEAD^) = $(git rev-parse master)\n '\ndiff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh\nindex 788b4a5..c52707b 100755\n--- a/t/t5500-fetch-pack.sh\n+++ b/t/t5500-fetch-pack.sh\n@@ -129,7 +129,7 @@ pull_to_client 2nd \"B\" $((64*3))\n \n pull_to_client 3rd \"A\" $((1*3)) # old fails\n \n-test_expect_success \"clone shallow\" \"git-clone --depth 2 file://`pwd`/. shallow\"\n+test_expect_success \"clone shallow\" 'git-clone --depth 2 \"file://$(pwd)/.\" shallow'\n \n (cd shallow; git count-objects -v) > count.shallow\n \ndiff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh\nindex c0dc949..e3df3ed 100755\n--- a/t/t5512-ls-remote.sh\n+++ b/t/t5512-ls-remote.sh\n@@ -17,7 +17,7 @@ test_expect_success setup '\n \t\tgit show-ref -d\t| sed -e \"s/ /\t/\"\n \t) >expected.all &&\n \n-\tgit remote add self $(pwd)/.git\n+\tgit remote add self \"$(pwd)\"/.git\n \n '\n \ndiff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh\nindex 6d7e738..a86042e 100755\n--- a/t/t5516-fetch-push.sh\n+++ b/t/t5516-fetch-push.sh\n@@ -4,7 +4,7 @@ test_description='fetching and pushing, with or without wildcard'\n \n . ./test-lib.sh\n \n-D=`pwd`\n+D=$(pwd)\n \n mk_empty () {\n \trm -fr testrepo &&\n@@ -103,9 +103,9 @@ test_expect_success 'fetch with wildcard' '\n test_expect_success 'fetch with insteadOf' '\n \tmk_empty &&\n \t(\n-\t\tTRASH=$(pwd)/ &&\n+\t\tTRASH=\"$(pwd)\"/ &&\n \t\tcd testrepo &&\n-\t\tgit config url.$TRASH.insteadOf trash/\n+\t\tgit config url.\"$TRASH\".insteadOf trash/\n \t\tgit config remote.up.url trash/. &&\n \t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n \t\tgit fetch up &&\n@@ -145,8 +145,8 @@ test_expect_success 'push with wildcard' '\n \n test_expect_success 'push with insteadOf' '\n \tmk_empty &&\n-\tTRASH=$(pwd)/ &&\n-\tgit config url.$TRASH.insteadOf trash/ &&\n+\tTRASH=\"$(pwd)\"/ &&\n+\tgit config url.\"$TRASH\".insteadOf trash/ &&\n \tgit push trash/testrepo refs/heads/master:refs/remotes/origin/master &&\n \t(\n \t\tcd testrepo &&\ndiff --git a/t/t5700-clone-reference.sh b/t/t5700-clone-reference.sh\nindex b6a5486..b6905c1 100755\n--- a/t/t5700-clone-reference.sh\n+++ b/t/t5700-clone-reference.sh\n@@ -6,7 +6,7 @@\n test_description='test clone --reference'\n . ./test-lib.sh\n \n-base_dir=`pwd`\n+base_dir=\"$(pwd)\"\n \n test_expect_success 'preparing first repository' \\\n 'test_create_repo A && cd A &&\n@@ -51,7 +51,7 @@ diff expected current'\n cd \"$base_dir\"\n \n test_expect_success 'cloning with reference (no -l -s)' \\\n-'git clone --reference B file://`pwd`/A D'\n+'git clone --reference B file://\"$(pwd)\"/A D'\n \n cd \"$base_dir\"\n \ndiff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh\nindex efd658a..5863cc2 100755\n--- a/t/t7003-filter-branch.sh\n+++ b/t/t7003-filter-branch.sh\n@@ -123,9 +123,9 @@ test_expect_success 'use index-filter to move into a subdirectory' '\n \tgit branch directorymoved &&\n \tgit-filter-branch -f --index-filter \\\n \t\t \"git ls-files -s | sed \\\"s-\\\\t-&newsubdir/-\\\" |\n-\t          GIT_INDEX_FILE=\\$GIT_INDEX_FILE.new \\\n+\t          GIT_INDEX_FILE=\\\"\\$GIT_INDEX_FILE\\\".new \\\n \t\t\tgit update-index --index-info &&\n-\t\t  mv \\$GIT_INDEX_FILE.new \\$GIT_INDEX_FILE\" directorymoved &&\n+\t\t  mv \\\"\\$GIT_INDEX_FILE\\\".new \\\"\\$GIT_INDEX_FILE\\\"\" directorymoved &&\n \ttest -z \"$(git diff HEAD directorymoved:newsubdir)\"'\n \n test_expect_success 'stops when msg filter fails' '\ndiff --git a/t/t7005-editor.sh b/t/t7005-editor.sh\nindex 2d919d6..2bf6a55 100755\n--- a/t/t7005-editor.sh\n+++ b/t/t7005-editor.sh\n@@ -92,7 +92,7 @@ test_expect_success 'editor with a space' '\n \tif echo \"echo space > \\\"\\$1\\\"\" > \"e space.sh\"\n \tthen\n \t\tchmod a+x \"e space.sh\" &&\n-\t\tGIT_EDITOR=\"./e\\ space.sh\" git commit --amend &&\n+\t\tGIT_EDITOR=\"./e space.sh\" git commit --amend &&\n \t\ttest space = \"$(git show -s --pretty=format:%s)\"\n \telse\n \t\tsay \"Skipping; FS does not support spaces in filenames\"\n@@ -105,7 +105,7 @@ test_expect_success 'core.editor with a space' '\n \n \tif test -f \"e space.sh\"\n \tthen\n-\t\tgit config core.editor \\\"./e\\ space.sh\\\" &&\n+\t\tgit config core.editor \"./e space.sh\" &&\n \t\tgit commit --amend &&\n \t\ttest space = \"$(git show -s --pretty=format:%s)\"\n \telse\ndiff --git a/t/t7010-setup.sh b/t/t7010-setup.sh\nindex 02cf7c5..d8a7c79 100755\n--- a/t/t7010-setup.sh\n+++ b/t/t7010-setup.sh\n@@ -122,7 +122,7 @@ test_expect_success 'commit using absolute path names' '\n \n test_expect_success 'log using absolute path names' '\n \techo bb >>a/b/c/d &&\n-\tgit commit -m \"bb\" $(pwd)/a/b/c/d &&\n+\tgit commit -m \"bb\" \"$(pwd)/a/b/c/d\" &&\n \n \tgit log a/b/c/d >f1.txt &&\n \tgit log \"$(pwd)/a/b/c/d\" >f2.txt &&\ndiff --git a/t/t7300-clean.sh b/t/t7300-clean.sh\nindex a50492f..4c9701f 100755\n--- a/t/t7300-clean.sh\n+++ b/t/t7300-clean.sh\n@@ -112,7 +112,7 @@ test_expect_success 'git-clean with absolute path' '\n \ttouch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&\n \twould_clean=$(\n \t\tcd docs &&\n-\t\tgit clean -n $(pwd)/../src |\n+\t\tgit clean -n \"$(pwd)\"/../src |\n \t\tsed -n -e \"s|^Would remove ||p\"\n \t) &&\n \ttest \"$would_clean\" = ../src/part3.c || {\ndiff --git a/t/t7501-commit.sh b/t/t7501-commit.sh\nindex c0288f3..4e5418a 100755\n--- a/t/t7501-commit.sh\n+++ b/t/t7501-commit.sh\n@@ -79,8 +79,8 @@ test_expect_success \\\n \n cat >editor <<\\EOF\n #!/bin/sh\n-sed -e \"s/a file/an amend commit/g\" < $1 > $1-\n-mv $1- $1\n+sed -e \"s/a file/an amend commit/g\" < \"$1\" > \"$1\"-\n+mv \"$1\"- \"$1\"\n EOF\n chmod 755 editor\n \n@@ -99,8 +99,8 @@ test_expect_success \\\n \n cat >editor <<\\EOF\n #!/bin/sh\n-sed -e \"s/amend/older/g\"  < $1 > $1-\n-mv $1- $1\n+sed -e \"s/amend/older/g\"  < \"$1\" > \"$1\"-\n+mv \"$1\"- \"$1\"\n EOF\n chmod 755 editor\n \ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex c0973b4..5047708 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -32,7 +32,7 @@ clean_fake_sendmail() {\n }\n \n test_expect_success 'Extract patches' '\n-    patches=`git format-patch -n HEAD^1`\n+    patches=$(git format-patch -n HEAD^1)\n '\n \n test_expect_success 'Send patches' '\n@@ -147,7 +147,7 @@ test_expect_success 'setup fake editor' '\n test_expect_success '--compose works' '\n \tclean_fake_sendmail &&\n \techo y | \\\n-\t\tGIT_EDITOR=$(pwd)/fake-editor \\\n+\t\tGIT_EDITOR=\"$(pwd)/fake-editor\" \\\n \t\tGIT_SEND_EMAIL_NOTTY=1 \\\n \t\tgit send-email \\\n \t\t--compose --subject foo \\\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex 4e24ab3..8f93821 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -20,27 +20,27 @@ esac\n echo 'define NO_SVN_TESTS to skip git-svn tests'\n \n test_expect_success \\\n-    'initialize git-svn' \"\n+    'initialize git-svn' '\n \tmkdir import &&\n \tcd import &&\n \techo foo > foo &&\n \tln -s foo foo.link\n \tmkdir -p dir/a/b/c/d/e &&\n-\techo 'deep dir' > dir/a/b/c/d/e/file &&\n+\techo \"deep dir\" > dir/a/b/c/d/e/file &&\n \tmkdir bar &&\n-\techo 'zzz' > bar/zzz &&\n-\techo '#!/bin/sh' > exec.sh &&\n+\techo \"zzz\" > bar/zzz &&\n+\techo \"#!/bin/sh\" > exec.sh &&\n \tchmod +x exec.sh &&\n-\tsvn import -m 'import for git-svn' . $svnrepo >/dev/null &&\n+\tsvn import -m \"import for git-svn\" . \"$svnrepo\" >/dev/null &&\n \tcd .. &&\n \trm -rf import &&\n-\tgit-svn init $svnrepo\"\n+\tgit-svn init \"$svnrepo\"'\n \n test_expect_success \\\n     'import an SVN revision into git' \\\n     'git-svn fetch'\n \n-test_expect_success \"checkout from svn\" \"svn co $svnrepo '$SVN_TREE'\"\n+test_expect_success \"checkout from svn\" \"svn co '$svnrepo' '$SVN_TREE'\"\n \n name='try a deep --rmdir with a commit'\n test_expect_success \"$name\" \"\n@@ -169,7 +169,7 @@ test_expect_success \"$name\" \"\n \tsvn up '$SVN_TREE' &&\n \ttest -f '$SVN_TREE'/exec-2.sh &&\n \ttest ! -L '$SVN_TREE'/exec-2.sh &&\n-\tgit diff help $SVN_TREE/exec-2.sh\"\n+\tgit diff help '$SVN_TREE'/exec-2.sh\"\n \n if test \"$have_utf8\" = t\n then\n@@ -190,7 +190,7 @@ name='test fetch functionality (svn => git) with alternate GIT_SVN_ID'\n GIT_SVN_ID=alt\n export GIT_SVN_ID\n test_expect_success \"$name\" \\\n-    \"git-svn init $svnrepo && git-svn fetch &&\n+    \"git-svn init '$svnrepo' && git-svn fetch &&\n      git rev-list --pretty=raw remotes/git-svn | grep ^tree | uniq > a &&\n      git rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b &&\n      git diff a b\"\n@@ -220,16 +220,16 @@ test_expect_success 'exit if remote refs are ambigious' \"\n \"\n \n test_expect_success 'exit if init-ing a would clobber a URL' \"\n-        svnadmin create ${PWD}/svnrepo2 &&\n-        svn mkdir -m 'mkdir bar' ${svnrepo}2/bar &&\n+        svnadmin create '${PWD}/svnrepo2' &&\n+        svn mkdir -m 'mkdir bar' '${svnrepo}2/bar' &&\n         git config --unset svn-remote.svn.fetch \\\n                                 '^bar:refs/remotes/git-svn$' &&\n-\t! git-svn init ${svnrepo}2/bar\n+\t! git-svn init '${svnrepo}2/bar'\n         \"\n \n test_expect_success \\\n   'init allows us to connect to another directory in the same repo' \"\n-        git-svn init --minimize-url -i bar $svnrepo/bar &&\n+        git-svn init --minimize-url -i bar '$svnrepo/bar' &&\n         git config --get svn-remote.svn.fetch \\\n                               '^bar:refs/remotes/bar$' &&\n         git config --get svn-remote.svn.fetch \\\ndiff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh\nindex d7a7047..2616df6 100755\n--- a/t/t9101-git-svn-props.sh\n+++ b/t/t9101-git-svn-props.sh\n@@ -52,7 +52,7 @@ EOF\n cd ..\n \n rm -rf import\n-test_expect_success 'checkout working copy from svn' \"svn co $svnrepo test_wc\"\n+test_expect_success 'checkout working copy from svn' \"svn co '$svnrepo' test_wc\"\n test_expect_success 'setup some commits to svn' \\\n \t'cd test_wc &&\n \t\techo Greetings >> kw.c &&\n@@ -66,7 +66,7 @@ test_expect_success 'setup some commits to svn' \\\n \t\tsvn commit -m \"Propset Id\" &&\n \tcd ..'\n \n-test_expect_success 'initialize git-svn' \"git-svn init $svnrepo\"\n+test_expect_success 'initialize git-svn' \"git-svn init '$svnrepo'\"\n test_expect_success 'fetch revisions from svn' 'git-svn fetch'\n \n name='test svn:keywords ignoring'\n@@ -92,7 +92,7 @@ test_expect_success \"propset CR on crlf files\" \\\n test_expect_success 'fetch and pull latest from svn and checkout a new wc' \\\n \t\"git-svn fetch &&\n \t git pull . remotes/git-svn &&\n-\t svn co $svnrepo new_wc\"\n+\t svn co '$svnrepo' new_wc\"\n \n for i in crlf ne_crlf lf ne_lf cr ne_cr empty_cr empty_lf empty empty_crlf\n do\ndiff --git a/t/t9102-git-svn-deep-rmdir.sh b/t/t9102-git-svn-deep-rmdir.sh\nindex 4e08083..99c8840 100755\n--- a/t/t9102-git-svn-deep-rmdir.sh\n+++ b/t/t9102-git-svn-deep-rmdir.sh\n@@ -9,12 +9,12 @@ test_expect_success 'initialize repo' \"\n \tmkdir -p deeply/nested/directory/number/2 &&\n \techo foo > deeply/nested/directory/number/1/file &&\n \techo foo > deeply/nested/directory/number/2/another &&\n-\tsvn import -m 'import for git-svn' . $svnrepo &&\n+\tsvn import -m 'import for git-svn' . '$svnrepo' &&\n \tcd ..\n \t\"\n \n test_expect_success 'mirror via git-svn' \"\n-\tgit-svn init $svnrepo &&\n+\tgit-svn init '$svnrepo' &&\n \tgit-svn fetch &&\n \tgit checkout -f -b test-rmdir remotes/git-svn\n \t\"\n@@ -23,7 +23,7 @@ test_expect_success 'Try a commit on rmdir' \"\n \tgit rm -f deeply/nested/directory/number/2/another &&\n \tgit commit -a -m 'remove another' &&\n \tgit-svn set-tree --rmdir HEAD &&\n-\tsvn ls -R $svnrepo | grep ^deeply/nested/directory/number/1\n+\tsvn ls -R '$svnrepo' | grep ^deeply/nested/directory/number/1\n \t\"\n \n \ndiff --git a/t/t9103-git-svn-tracked-directory-removed.sh b/t/t9103-git-svn-tracked-directory-removed.sh\nindex 0f0b0fd..a85050a 100755\n--- a/t/t9103-git-svn-tracked-directory-removed.sh\n+++ b/t/t9103-git-svn-tracked-directory-removed.sh\n@@ -10,19 +10,19 @@ test_expect_success 'make history for tracking' '\n \tmkdir import &&\n \tmkdir import/trunk &&\n \techo hello >> import/trunk/README &&\n-\tsvn import -m initial import $svnrepo &&\n+\tsvn import -m initial import \"$svnrepo\" &&\n \trm -rf import &&\n-\tsvn co $svnrepo/trunk trunk &&\n+\tsvn co \"$svnrepo/trunk\" trunk &&\n \techo bye bye >> trunk/README &&\n-\tsvn rm -m \"gone\" $svnrepo/trunk &&\n+\tsvn rm -m \"gone\" \"$svnrepo/trunk\" &&\n \trm -rf trunk &&\n \tmkdir trunk &&\n \techo \"new\" > trunk/FOLLOWME &&\n-\tsvn import -m \"new trunk\" trunk $svnrepo/trunk\n+\tsvn import -m \"new trunk\" trunk \"$svnrepo/trunk\"\n '\n \n test_expect_success 'clone repo with git' '\n-\tgit svn clone -s $svnrepo x &&\n+\tgit svn clone -s \"$svnrepo\" x &&\n \ttest -f x/FOLLOWME &&\n \ttest ! -f x/README\n '\ndiff --git a/t/t9104-git-svn-follow-parent.sh b/t/t9104-git-svn-follow-parent.sh\nindex 7ba7630..499d9e6 100755\n--- a/t/t9104-git-svn-follow-parent.sh\n+++ b/t/t9104-git-svn-follow-parent.sh\n@@ -11,9 +11,9 @@ test_expect_success 'initialize repo' \"\n \tcd import &&\n \tmkdir -p trunk &&\n \techo hello > trunk/readme &&\n-\tsvn import -m 'initial' . $svnrepo &&\n+\tsvn import -m 'initial' . '$svnrepo' &&\n \tcd .. &&\n-\tsvn co $svnrepo wc &&\n+\tsvn co '$svnrepo' wc &&\n \tcd wc &&\n \techo world >> trunk/readme &&\n \tpoke trunk/readme &&\n@@ -27,7 +27,7 @@ test_expect_success 'initialize repo' \"\n \t\"\n \n test_expect_success 'init and fetch a moved directory' \"\n-\tgit-svn init --minimize-url -i thunk $svnrepo/thunk &&\n+\tgit-svn init --minimize-url -i thunk '$svnrepo/thunk' &&\n \tgit-svn fetch -i thunk &&\n \ttest \\\"\\`git rev-parse --verify refs/remotes/thunk@2\\`\\\" \\\n            = \\\"\\`git rev-parse --verify refs/remotes/thunk~1\\`\\\" &&\n@@ -38,7 +38,7 @@ test_expect_success 'init and fetch a moved directory' \"\n \t\"\n \n test_expect_success 'init and fetch from one svn-remote' \"\n-        git config svn-remote.svn.url $svnrepo &&\n+        git config svn-remote.svn.url '$svnrepo' &&\n         git config --add svn-remote.svn.fetch \\\n           trunk:refs/remotes/svn/trunk &&\n         git config --add svn-remote.svn.fetch \\\n@@ -52,9 +52,9 @@ test_expect_success 'init and fetch from one svn-remote' \"\n \n test_expect_success 'follow deleted parent' \"\n         (svn cp -m 'resurrecting trunk as junk' \\\n-               $svnrepo/trunk@2 $svnrepo/junk ||\n+               '$svnrepo/trunk@2' '$svnrepo/junk' ||\n          svn cp -m 'resurrecting trunk as junk' \\\n-               -r2 $svnrepo/trunk $svnrepo/junk) &&\n+               -r2 '$svnrepo/trunk' '$svnrepo/junk') &&\n         git config --add svn-remote.svn.fetch \\\n           junk:refs/remotes/svn/junk &&\n         git-svn fetch -i svn/thunk &&\n@@ -67,10 +67,10 @@ test_expect_success 'follow deleted parent' \"\n test_expect_success 'follow larger parent' \"\n         mkdir -p import/trunk/thunk/bump/thud &&\n         echo hi > import/trunk/thunk/bump/thud/file &&\n-        svn import -m 'import a larger parent' import $svnrepo/larger-parent &&\n-        svn cp -m 'hi' $svnrepo/larger-parent $svnrepo/another-larger &&\n+        svn import -m 'import a larger parent' import '$svnrepo/larger-parent' &&\n+        svn cp -m 'hi' '$svnrepo/larger-parent' '$svnrepo/another-larger' &&\n         git-svn init --minimize-url -i larger \\\n-          $svnrepo/another-larger/trunk/thunk/bump/thud &&\n+          '$svnrepo/another-larger/trunk/thunk/bump/thud' &&\n         git-svn fetch -i larger &&\n         git rev-parse --verify refs/remotes/larger &&\n         git rev-parse --verify \\\n@@ -83,23 +83,23 @@ test_expect_success 'follow larger parent' \"\n         \"\n \n test_expect_success 'follow higher-level parent' \"\n-        svn mkdir -m 'follow higher-level parent' $svnrepo/blob &&\n-        svn co $svnrepo/blob blob &&\n+        svn mkdir -m 'follow higher-level parent' '$svnrepo/blob' &&\n+        svn co '$svnrepo/blob' blob &&\n         cd blob &&\n                 echo hi > hi &&\n                 svn add hi &&\n                 svn commit -m 'hihi' &&\n                 cd ..\n-        svn mkdir -m 'new glob at top level' $svnrepo/glob &&\n-        svn mv -m 'move blob down a level' $svnrepo/blob $svnrepo/glob/blob &&\n-        git-svn init --minimize-url -i blob $svnrepo/glob/blob &&\n+        svn mkdir -m 'new glob at top level' '$svnrepo/glob' &&\n+        svn mv -m 'move blob down a level' '$svnrepo/blob' '$svnrepo/glob/blob' &&\n+        git-svn init --minimize-url -i blob '$svnrepo/glob/blob' &&\n         git-svn fetch -i blob\n         \"\n \n test_expect_success 'follow deleted directory' \"\n-\tsvn mv -m 'bye!' $svnrepo/glob/blob/hi $svnrepo/glob/blob/bye &&\n-\tsvn rm -m 'remove glob' $svnrepo/glob &&\n-\tgit-svn init --minimize-url -i glob $svnrepo/glob &&\n+\tsvn mv -m 'bye!' '$svnrepo/glob/blob/hi' '$svnrepo/glob/blob/bye' &&\n+\tsvn rm -m 'remove glob' '$svnrepo/glob' &&\n+\tgit-svn init --minimize-url -i glob '$svnrepo/glob' &&\n \tgit-svn fetch -i glob &&\n \ttest \\\"\\`git cat-file blob refs/remotes/glob:blob/bye\\`\\\" = hi &&\n \ttest \\\"\\`git ls-tree refs/remotes/glob | wc -l \\`\\\" -eq 1\n@@ -118,9 +118,9 @@ test_expect_success 'follow-parent avoids deleting relevant info' \"\n \t  echo 'bad delete test 2' > \\\n \t   import/trunk/subversion/bindings/swig/perl/another-larger &&\n \tcd import &&\n-\t  svn import -m 'r9270 test' . $svnrepo/r9270 &&\n+\t  svn import -m 'r9270 test' . '$svnrepo/r9270' &&\n \tcd .. &&\n-\tsvn co $svnrepo/r9270/trunk/subversion/bindings/swig/perl r9270 &&\n+\tsvn co '$svnrepo/r9270/trunk/subversion/bindings/swig/perl' r9270 &&\n \tcd r9270 &&\n \t  svn mkdir native &&\n \t  svn mv t native/t &&\n@@ -130,7 +130,7 @@ test_expect_success 'follow-parent avoids deleting relevant info' \"\n \t  svn commit -m 'reorg test' &&\n \tcd .. &&\n \tgit-svn init --minimize-url -i r9270-t \\\n-\t  $svnrepo/r9270/trunk/subversion/bindings/swig/perl/native/t &&\n+\t  '$svnrepo/r9270/trunk/subversion/bindings/swig/perl/native/t' &&\n \tgit-svn fetch -i r9270-t &&\n \ttest \\`git rev-list r9270-t | wc -l\\` -eq 2 &&\n \ttest \\\"\\`git ls-tree --name-only r9270-t~1\\`\\\" = \\\n@@ -138,9 +138,9 @@ test_expect_success 'follow-parent avoids deleting relevant info' \"\n \t\"\n \n test_expect_success \"track initial change if it was only made to parent\" \"\n-\tsvn cp -m 'wheee!' $svnrepo/r9270/trunk $svnrepo/r9270/drunk &&\n+\tsvn cp -m 'wheee!' '$svnrepo/r9270/trunk' '$svnrepo/r9270/drunk' &&\n \tgit-svn init --minimize-url -i r9270-d \\\n-\t  $svnrepo/r9270/drunk/subversion/bindings/swig/perl/native/t &&\n+\t  '$svnrepo/r9270/drunk/subversion/bindings/swig/perl/native/t' &&\n \tgit-svn fetch -i r9270-d &&\n \ttest \\`git rev-list r9270-d | wc -l\\` -eq 3 &&\n \ttest \\\"\\`git ls-tree --name-only r9270-t\\`\\\" = \\\n@@ -150,7 +150,7 @@ test_expect_success \"track initial change if it was only made to parent\" \"\n \t\"\n \n test_expect_success \"track multi-parent paths\" \"\n-\tsvn cp -m 'resurrect /glob' $svnrepo/r9270 $svnrepo/glob &&\n+\tsvn cp -m 'resurrect /glob' '$svnrepo/r9270' '$svnrepo/glob' &&\n \tgit-svn multi-fetch &&\n \ttest \\`git cat-file commit refs/remotes/glob | \\\n \t       grep '^parent ' | wc -l\\` -eq 2\n@@ -161,8 +161,8 @@ test_expect_success \"multi-fetch continues to work\" \"\n \t\"\n \n test_expect_success \"multi-fetch works off a 'clean' repository\" \"\n-\trm -r $GIT_DIR/svn $GIT_DIR/refs/remotes $GIT_DIR/logs &&\n-\tmkdir $GIT_DIR/svn &&\n+\trm -r '$GIT_DIR/svn' '$GIT_DIR/refs/remotes' '$GIT_DIR/logs' &&\n+\tmkdir '$GIT_DIR/svn' &&\n \tgit-svn multi-fetch\n \t\"\n \ndiff --git a/t/t9105-git-svn-commit-diff.sh b/t/t9105-git-svn-commit-diff.sh\nindex 318e172..2e1eb75 100755\n--- a/t/t9105-git-svn-commit-diff.sh\n+++ b/t/t9105-git-svn-commit-diff.sh\n@@ -8,7 +8,7 @@ test_expect_success 'initialize repo' \"\n \tmkdir import &&\n \tcd import &&\n \techo hello > readme &&\n-\tsvn import -m 'initial' . $svnrepo &&\n+\tsvn import -m 'initial' . '$svnrepo' &&\n \tcd .. &&\n \techo hello > readme &&\n \tgit update-index --add readme &&\n@@ -27,16 +27,16 @@ prev=`git rev-parse --verify HEAD^1`\n test_expect_success 'test the commit-diff command' \"\n \ttest -n '$prev' && test -n '$head' &&\n \tgit-svn commit-diff -r1 '$prev' '$head' '$svnrepo' &&\n-\tsvn co $svnrepo wc &&\n+\tsvn co '$svnrepo' wc &&\n \tcmp readme wc/readme\n \t\"\n \n test_expect_success 'commit-diff to a sub-directory (with git-svn config)' \"\n-\tsvn import -m 'sub-directory' import $svnrepo/subdir &&\n-\tgit-svn init --minimize-url $svnrepo/subdir &&\n+\tsvn import -m 'sub-directory' import '$svnrepo/subdir' &&\n+\tgit-svn init --minimize-url '$svnrepo/subdir' &&\n \tgit-svn fetch &&\n \tgit-svn commit-diff -r3 '$prev' '$head' &&\n-\tsvn cat $svnrepo/subdir/readme > readme.2 &&\n+\tsvn cat '$svnrepo/subdir/readme' > readme.2 &&\n \tcmp readme readme.2\n \t\"\n \ndiff --git a/t/t9106-git-svn-commit-diff-clobber.sh b/t/t9106-git-svn-commit-diff-clobber.sh\nindex f74ab12..5125ed0 100755\n--- a/t/t9106-git-svn-commit-diff-clobber.sh\n+++ b/t/t9106-git-svn-commit-diff-clobber.sh\n@@ -8,14 +8,14 @@ test_expect_success 'initialize repo' \"\n \tmkdir import &&\n \tcd import &&\n \techo initial > file &&\n-\tsvn import -m 'initial' . $svnrepo &&\n+\tsvn import -m 'initial' . '$svnrepo' &&\n \tcd .. &&\n \techo initial > file &&\n \tgit update-index --add file &&\n \tgit commit -a -m 'initial'\n \t\"\n test_expect_success 'commit change from svn side' \"\n-\tsvn co $svnrepo t.svn &&\n+\tsvn co '$svnrepo' t.svn &&\n \tcd t.svn &&\n \techo second line from svn >> file &&\n \tpoke file &&\n@@ -27,7 +27,7 @@ test_expect_success 'commit change from svn side' \"\n test_expect_success 'commit conflicting change from git' \"\n \techo second line from git >> file &&\n \tgit commit -a -m 'second line from git' &&\n-\t! git-svn commit-diff -r1 HEAD~1 HEAD $svnrepo\n+\t! git-svn commit-diff -r1 HEAD~1 HEAD '$svnrepo'\n \"\n \n test_expect_success 'commit complementing change from git' \"\n@@ -36,14 +36,14 @@ test_expect_success 'commit complementing change from git' \"\n \tgit commit -a -m 'second line from svn' &&\n \techo third line from git >> file &&\n \tgit commit -a -m 'third line from git' &&\n-\tgit-svn commit-diff -r2 HEAD~1 HEAD $svnrepo\n+\tgit-svn commit-diff -r2 HEAD~1 HEAD '$svnrepo'\n \t\"\n \n test_expect_success 'dcommit fails to commit because of conflict' \"\n-\tgit-svn init $svnrepo &&\n+\tgit-svn init '$svnrepo' &&\n \tgit-svn fetch &&\n \tgit reset --hard refs/remotes/git-svn &&\n-\tsvn co $svnrepo t.svn &&\n+\tsvn co '$svnrepo' t.svn &&\n \tcd t.svn &&\n \techo fourth line from svn >> file &&\n \tpoke file &&\n@@ -67,7 +67,7 @@ test_expect_success 'dcommit does the svn equivalent of an index merge' \"\n \t\"\n \n test_expect_success 'commit another change from svn side' \"\n-\tsvn co $svnrepo t.svn &&\n+\tsvn co '$svnrepo' t.svn &&\n \tcd t.svn &&\n \t\techo third line from svn >> file &&\n \t\tpoke file &&\ndiff --git a/t/t9106-git-svn-dcommit-clobber-series.sh b/t/t9106-git-svn-dcommit-clobber-series.sh\nindex ca8a00e..fb4b67a 100755\n--- a/t/t9106-git-svn-dcommit-clobber-series.sh\n+++ b/t/t9106-git-svn-dcommit-clobber-series.sh\n@@ -8,9 +8,9 @@ test_expect_success 'initialize repo' \"\n \tmkdir import &&\n \tcd import &&\n \tawk 'BEGIN { for (i = 1; i < 64; i++) { print i } }' > file\n-\tsvn import -m 'initial' . $svnrepo &&\n+\tsvn import -m 'initial' . '$svnrepo' &&\n \tcd .. &&\n-\tgit svn init $svnrepo &&\n+\tgit svn init '$svnrepo' &&\n \tgit svn fetch &&\n \ttest -e file\n \t\"\n@@ -18,7 +18,7 @@ test_expect_success 'initialize repo' \"\n test_expect_success '(supposedly) non-conflicting change from SVN' \"\n \ttest x\\\"\\`sed -n -e 58p < file\\`\\\" = x58 &&\n \ttest x\\\"\\`sed -n -e 61p < file\\`\\\" = x61 &&\n-\tsvn co $svnrepo tmp &&\n+\tsvn co '$svnrepo' tmp &&\n \tcd tmp &&\n \t\tperl -i -p -e 's/^58\\$/5588/' file &&\n \t\tperl -i -p -e 's/^61\\$/6611/' file &&\ndiff --git a/t/t9107-git-svn-migrate.sh b/t/t9107-git-svn-migrate.sh\nindex 0a41d52..545a08a 100755\n--- a/t/t9107-git-svn-migrate.sh\n+++ b/t/t9107-git-svn-migrate.sh\n@@ -4,7 +4,7 @@ test_description='git-svn metadata migrations from previous versions'\n . ./lib-git-svn.sh\n \n test_expect_success 'setup old-looking metadata' \"\n-\tcp $GIT_DIR/config $GIT_DIR/config-old-git-svn &&\n+\tcp '$GIT_DIR/config' '$GIT_DIR/config-old-git-svn' &&\n \tmkdir import &&\n \tcd import &&\n \t\tfor i in trunk branches/a branches/b \\\n@@ -12,13 +12,13 @@ test_expect_success 'setup old-looking metadata' \"\n \t\t\tmkdir -p \\$i && \\\n \t\t\techo hello >> \\$i/README || exit 1\n \t\tdone && \\\n-\t\tsvn import -m test . $svnrepo\n+\t\tsvn import -m test . '$svnrepo'\n \t\tcd .. &&\n-\tgit-svn init $svnrepo &&\n+\tgit-svn init '$svnrepo' &&\n \tgit-svn fetch &&\n-\tmv $GIT_DIR/svn/* $GIT_DIR/ &&\n-\tmv $GIT_DIR/svn/.metadata $GIT_DIR/ &&\n-\trmdir $GIT_DIR/svn &&\n+\tmv '$GIT_DIR/svn/'* '$GIT_DIR/' &&\n+\tmv '$GIT_DIR/svn/.metadata' '$GIT_DIR/' &&\n+\trmdir '$GIT_DIR/svn' &&\n \tgit update-ref refs/heads/git-svn-HEAD refs/remotes/git-svn &&\n \tgit update-ref refs/heads/svn-HEAD refs/remotes/git-svn &&\n \tgit update-ref -d refs/remotes/git-svn refs/remotes/git-svn\n@@ -28,20 +28,20 @@ head=`git rev-parse --verify refs/heads/git-svn-HEAD^0`\n test_expect_success 'git-svn-HEAD is a real HEAD' \"test -n '$head'\"\n \n test_expect_success 'initialize old-style (v0) git-svn layout' \"\n-\tmkdir -p $GIT_DIR/git-svn/info $GIT_DIR/svn/info &&\n-\techo $svnrepo > $GIT_DIR/git-svn/info/url &&\n-\techo $svnrepo > $GIT_DIR/svn/info/url &&\n+\tmkdir -p '$GIT_DIR/git-svn/info' '$GIT_DIR/svn/info' &&\n+\techo '$svnrepo' > '$GIT_DIR/git-svn/info/url' &&\n+\techo '$svnrepo' > '$GIT_DIR/svn/info/url' &&\n \tgit-svn migrate &&\n-\t! test -d $GIT_DIR/git-svn &&\n+\t! test -d '$GIT_DIR/git-svn' &&\n \tgit rev-parse --verify refs/remotes/git-svn^0 &&\n \tgit rev-parse --verify refs/remotes/svn^0 &&\n-\ttest \\`git config --get svn-remote.svn.url\\` = '$svnrepo' &&\n-\ttest \\`git config --get svn-remote.svn.fetch\\` = \\\n+\ttest '$(git config --get svn-remote.svn.url)' = '$svnrepo' &&\n+\ttest '$(git config --get svn-remote.svn.fetch)' = \\\n              ':refs/remotes/git-svn'\n \t\"\n \n test_expect_success 'initialize a multi-repository repo' \"\n-\tgit-svn init $svnrepo -T trunk -t tags -b branches &&\n+\tgit-svn init '$svnrepo' -T trunk -t tags -b branches &&\n \tgit config --get-all svn-remote.svn.fetch > fetch.out &&\n \tgrep '^trunk:refs/remotes/trunk$' fetch.out &&\n \ttest -n \\\"\\`git config --get svn-remote.svn.branches \\\n@@ -76,14 +76,14 @@ test_expect_success 'multi-fetch works on partial urls + paths' \"\n test_expect_success 'migrate --minimize on old inited layout' \"\n \tgit config --unset-all svn-remote.svn.fetch &&\n \tgit config --unset-all svn-remote.svn.url &&\n-\trm -rf $GIT_DIR/svn &&\n+\trm -rf '$GIT_DIR/svn' &&\n \tfor i in \\`cat fetch.out\\`; do\n \t\tpath=\\`expr \\$i : '\\\\([^:]*\\\\):.*$'\\`\n \t\tref=\\`expr \\$i : '[^:]*:refs/remotes/\\\\(.*\\\\)$'\\`\n \t\tif test -z \\\"\\$ref\\\"; then continue; fi\n \t\tif test -n \\\"\\$path\\\"; then path=\\\"/\\$path\\\"; fi\n-\t\t( mkdir -p $GIT_DIR/svn/\\$ref/info/ &&\n-\t\techo $svnrepo\\$path > $GIT_DIR/svn/\\$ref/info/url ) || exit 1;\n+\t\t( mkdir -p '$GIT_DIR'/svn/\\$ref/info/ &&\n+\t\techo '$svnrepo'\\$path > '$GIT_DIR'/svn/\\$ref/info/url ) || exit 1;\n \tdone &&\n \tgit-svn migrate --minimize &&\n \ttest -z \\\"\\`git config -l |grep -v '^svn-remote\\.git-svn\\.'\\`\\\" &&\n@@ -99,17 +99,17 @@ test_expect_success 'migrate --minimize on old inited layout' \"\n \n test_expect_success  \".rev_db auto-converted to .rev_map.UUID\" \"\n \tgit-svn fetch -i trunk &&\n-\ttest -z \\\"\\$(ls $GIT_DIR/svn/trunk/.rev_db.* 2>/dev/null)\\\" &&\n-\texpect=\\\"\\$(ls $GIT_DIR/svn/trunk/.rev_map.*)\\\" &&\n+\ttest -z \\\"\\$(ls '$GIT_DIR'/svn/trunk/.rev_db.* 2>/dev/null)\\\" &&\n+\texpect=\\\"\\$(ls '$GIT_DIR'/svn/trunk/.rev_map.*)\\\" &&\n \ttest -n \\\"\\$expect\\\" &&\n \trev_db=\\$(echo \\$expect | sed -e 's,_map,_db,') &&\n-\tconvert_to_rev_db \\$expect \\$rev_db &&\n-\trm -f \\$expect &&\n-\ttest -f \\$rev_db &&\n+\tconvert_to_rev_db \\\"\\$expect\\\" \\\"\\$rev_db\\\" &&j\n+\trm -f \\\"\\$expect\\\" &&\n+\ttest -f \\\"\\$rev_db\\\" &&\n \tgit-svn fetch -i trunk &&\n-\ttest -z \\\"\\$(ls $GIT_DIR/svn/trunk/.rev_db.* 2>/dev/null)\\\" &&\n-\ttest ! -e $GIT_DIR/svn/trunk/.rev_db &&\n-\ttest -f \\$expect\n+\ttest -z \\\"\\$(ls '$GIT_DIR'/svn/trunk/.rev_db.* 2>/dev/null)\\\" &&\n+\ttest ! -e '$GIT_DIR'/svn/trunk/.rev_db &&\n+\ttest -f \\\"\\$expect\\\"\n \t\"\n \n test_done\ndiff --git a/t/t9108-git-svn-glob.sh b/t/t9108-git-svn-glob.sh\nindex db4344c..c6dc0ef 100755\n--- a/t/t9108-git-svn-glob.sh\n+++ b/t/t9108-git-svn-glob.sh\n@@ -14,8 +14,8 @@ test_expect_success 'test refspec globbing' \"\n \tmkdir -p trunk/src/a trunk/src/b trunk/doc &&\n \techo 'hello world' > trunk/src/a/readme &&\n \techo 'goodbye world' > trunk/src/b/readme &&\n-\tsvn import -m 'initial' trunk $svnrepo/trunk &&\n-\tsvn co $svnrepo tmp &&\n+\tsvn import -m 'initial' trunk '$svnrepo/trunk' &&\n+\tsvn co '$svnrepo' tmp &&\n \tcd tmp &&\n \t\tmkdir branches tags &&\n \t\tsvn add branches tags &&\n@@ -38,7 +38,7 @@ test_expect_success 'test refspec globbing' \"\n \t\tpoke tags/end/src/b/readme &&\n \t\tsvn commit -m 'nothing to see here'\n \t\tcd .. &&\n-\tgit config --add svn-remote.svn.url $svnrepo &&\n+\tgit config --add svn-remote.svn.url '$svnrepo' &&\n \tgit config --add svn-remote.svn.fetch \\\n \t                 'trunk/src/a:refs/remotes/trunk' &&\n \tgit config --add svn-remote.svn.branches \\\n@@ -60,7 +60,7 @@ echo nothing to see here >> expect.two\n cat expect.end >> expect.two\n \n test_expect_success 'test left-hand-side only globbing' \"\n-\tgit config --add svn-remote.two.url $svnrepo &&\n+\tgit config --add svn-remote.two.url '$svnrepo' &&\n \tgit config --add svn-remote.two.fetch trunk:refs/remotes/two/trunk &&\n \tgit config --add svn-remote.two.branches \\\n \t                 'branches/*:refs/remotes/two/branches/*' &&\ndiff --git a/t/t9110-git-svn-use-svm-props.sh b/t/t9110-git-svn-use-svm-props.sh\nindex 6235af4..d4ab01f 100755\n--- a/t/t9110-git-svn-use-svm-props.sh\n+++ b/t/t9110-git-svn-use-svm-props.sh\n@@ -8,11 +8,11 @@ test_description='git-svn useSvmProps test'\n . ./lib-git-svn.sh\n \n test_expect_success 'load svm repo' \"\n-\tsvnadmin load -q $rawsvnrepo < ../t9110/svm.dump &&\n-\tgit-svn init --minimize-url -R arr -i bar $svnrepo/mirror/arr &&\n-\tgit-svn init --minimize-url -R argh -i dir $svnrepo/mirror/argh &&\n+\tsvnadmin load -q '$rawsvnrepo' < ../t9110/svm.dump &&\n+\tgit-svn init --minimize-url -R arr -i bar '$svnrepo/mirror/arr' &&\n+\tgit-svn init --minimize-url -R argh -i dir '$svnrepo/mirror/argh' &&\n \tgit-svn init --minimize-url -R argh -i e \\\n-\t  $svnrepo/mirror/argh/a/b/c/d/e &&\n+\t  '$svnrepo/mirror/argh/a/b/c/d/e' &&\n \tgit config svn.useSvmProps true &&\n \tgit-svn fetch --all\n \t\"\ndiff --git a/t/t9111-git-svn-use-svnsync-props.sh b/t/t9111-git-svn-use-svnsync-props.sh\nindex ec7dedd..936f023 100755\n--- a/t/t9111-git-svn-use-svnsync-props.sh\n+++ b/t/t9111-git-svn-use-svnsync-props.sh\n@@ -8,10 +8,10 @@ test_description='git-svn useSvnsyncProps test'\n . ./lib-git-svn.sh\n \n test_expect_success 'load svnsync repo' \"\n-\tsvnadmin load -q $rawsvnrepo < ../t9111/svnsync.dump &&\n-\tgit-svn init --minimize-url -R arr -i bar $svnrepo/bar &&\n-\tgit-svn init --minimize-url -R argh -i dir $svnrepo/dir &&\n-\tgit-svn init --minimize-url -R argh -i e $svnrepo/dir/a/b/c/d/e &&\n+\tsvnadmin load -q '$rawsvnrepo' < ../t9111/svnsync.dump &&\n+\tgit-svn init --minimize-url -R arr -i bar '$svnrepo/bar' &&\n+\tgit-svn init --minimize-url -R argh -i dir '$svnrepo/dir' &&\n+\tgit-svn init --minimize-url -R argh -i e '$svnrepo/dir/a/b/c/d/e' &&\n \tgit config svn.useSvnsyncProps true &&\n \tgit-svn fetch --all\n \t\"\ndiff --git a/t/t9112-git-svn-md5less-file.sh b/t/t9112-git-svn-md5less-file.sh\nindex 646a5f0..d6a5a5b 100755\n--- a/t/t9112-git-svn-md5less-file.sh\n+++ b/t/t9112-git-svn-md5less-file.sh\n@@ -40,8 +40,8 @@ PROPS-END\n \n EOF\n \n-test_expect_success 'load svn dumpfile' \"svnadmin load $rawsvnrepo < dumpfile.svn\"\n+test_expect_success 'load svn dumpfile' \"svnadmin load '$rawsvnrepo' < dumpfile.svn\"\n \n-test_expect_success 'initialize git-svn' \"git-svn init $svnrepo\"\n+test_expect_success 'initialize git-svn' \"git-svn init '$svnrepo'\"\n test_expect_success 'fetch revisions from svn' 'git-svn fetch'\n test_done\ndiff --git a/t/t9113-git-svn-dcommit-new-file.sh b/t/t9113-git-svn-dcommit-new-file.sh\nindex 9ef0db9..b84a21e 100755\n--- a/t/t9113-git-svn-dcommit-new-file.sh\n+++ b/t/t9113-git-svn-dcommit-new-file.sh\n@@ -15,14 +15,14 @@ test_description='git-svn dcommit new files over svn:// test'\n \n start_svnserve () {\n \tsvnserve --listen-port $SVNSERVE_PORT \\\n-\t         --root $rawsvnrepo \\\n+\t         --root \"$rawsvnrepo\" \\\n \t         --listen-once \\\n \t         --listen-host 127.0.0.1 &\n }\n \n test_expect_success 'start tracking an empty repo' \"\n-\tsvn mkdir -m 'empty dir' $svnrepo/empty-dir &&\n-\techo anon-access = write >> $rawsvnrepo/conf/svnserve.conf &&\n+\tsvn mkdir -m 'empty dir' '$svnrepo/empty-dir' &&\n+\techo 'anon-access = write' >> '$rawsvnrepo/conf/svnserve.conf' &&\n \tstart_svnserve &&\n \tgit svn init svn://127.0.0.1:$SVNSERVE_PORT &&\n \tgit svn fetch\ndiff --git a/t/t9114-git-svn-dcommit-merge.sh b/t/t9114-git-svn-dcommit-merge.sh\nindex 225060b..9d9e34c 100755\n--- a/t/t9114-git-svn-dcommit-merge.sh\n+++ b/t/t9114-git-svn-dcommit-merge.sh\n@@ -35,7 +35,7 @@ EOF\n }\n \n test_expect_success 'setup svn repository' \"\n-\tsvn co $svnrepo mysvnwork &&\n+\tsvn co '$svnrepo' mysvnwork &&\n \tmkdir -p mysvnwork/trunk &&\n \tcd mysvnwork &&\n \t\tbig_text_block >> trunk/README &&\n@@ -45,7 +45,7 @@ test_expect_success 'setup svn repository' \"\n \t\"\n \n test_expect_success 'setup git mirror and merge' \"\n-\tgit svn init $svnrepo -t tags -T trunk -b branches &&\n+\tgit svn init '$svnrepo' -t tags -T trunk -b branches &&\n \tgit svn fetch &&\n \tgit checkout --track -b svn remotes/trunk &&\n \tgit checkout -b merge &&\ndiff --git a/t/t9115-git-svn-dcommit-funky-renames.sh b/t/t9115-git-svn-dcommit-funky-renames.sh\nindex 182299c..653578d 100755\n--- a/t/t9115-git-svn-dcommit-funky-renames.sh\n+++ b/t/t9115-git-svn-dcommit-funky-renames.sh\n@@ -8,12 +8,12 @@ test_description='git-svn dcommit can commit renames of files with ugly names'\n . ./lib-git-svn.sh\n \n test_expect_success 'load repository with strange names' \"\n-\tsvnadmin load -q $rawsvnrepo < ../t9115/funky-names.dump &&\n+\tsvnadmin load -q '$rawsvnrepo' < ../t9115/funky-names.dump &&\n \tstart_httpd\n \t\"\n \n test_expect_success 'init and fetch repository' \"\n-\tgit svn init $svnrepo &&\n+\tgit svn init '$svnrepo' &&\n \tgit svn fetch &&\n \tgit reset --hard git-svn\n \t\"\ndiff --git a/t/t9116-git-svn-log.sh b/t/t9116-git-svn-log.sh\nindex e1e8bdf..ab46903 100755\n--- a/t/t9116-git-svn-log.sh\n+++ b/t/t9116-git-svn-log.sh\n@@ -14,9 +14,9 @@ test_expect_success 'setup repository and import' \"\n \t\t\tmkdir -p \\$i && \\\n \t\t\techo hello >> \\$i/README || exit 1\n \t\tdone && \\\n-\t\tsvn import -m test . $svnrepo\n+\t\tsvn import -m test . '$svnrepo'\n \t\tcd .. &&\n-\tgit-svn init $svnrepo -T trunk -b branches -t tags &&\n+\tgit-svn init '$svnrepo' -T trunk -b branches -t tags &&\n \tgit-svn fetch &&\n \tgit reset --hard trunk &&\n \techo bye >> README &&\ndiff --git a/t/t9117-git-svn-init-clone.sh b/t/t9117-git-svn-init-clone.sh\nindex d482b40..aa1b167 100755\n--- a/t/t9117-git-svn-init-clone.sh\n+++ b/t/t9117-git-svn-init-clone.sh\n@@ -16,13 +16,13 @@ cd tmp\n test_expect_success 'setup svnrepo' \"\n \tmkdir project project/trunk project/branches project/tags &&\n \techo foo > project/trunk/foo &&\n-\tsvn import -m '$test_description' project $svnrepo/project &&\n+\tsvn import -m '$test_description' project '$svnrepo/project' &&\n \trm -rf project\n \t\"\n \n test_expect_success 'basic clone' \"\n \ttest ! -d trunk &&\n-\tgit svn clone $svnrepo/project/trunk &&\n+\tgit svn clone '$svnrepo/project/trunk' &&\n \ttest -d trunk/.git/svn &&\n \ttest -e trunk/foo &&\n \trm -rf trunk\n@@ -30,7 +30,7 @@ test_expect_success 'basic clone' \"\n \n test_expect_success 'clone to target directory' \"\n \ttest ! -d target &&\n-\tgit svn clone $svnrepo/project/trunk target &&\n+\tgit svn clone '$svnrepo/project/trunk' target &&\n \ttest -d target/.git/svn &&\n \ttest -e target/foo &&\n \trm -rf target\n@@ -38,7 +38,7 @@ test_expect_success 'clone to target directory' \"\n \n test_expect_success 'clone with --stdlayout' \"\n \ttest ! -d project &&\n-\tgit svn clone -s $svnrepo/project &&\n+\tgit svn clone -s '$svnrepo/project' &&\n \ttest -d project/.git/svn &&\n \ttest -e project/foo &&\n \trm -rf project\n@@ -46,7 +46,7 @@ test_expect_success 'clone with --stdlayout' \"\n \n test_expect_success 'clone to target directory with --stdlayout' \"\n \ttest ! -d target &&\n-\tgit svn clone -s $svnrepo/project target &&\n+\tgit svn clone -s '$svnrepo/project' target &&\n \ttest -d target/.git/svn &&\n \ttest -e target/foo &&\n \trm -rf target\ndiff --git a/t/t9121-git-svn-fetch-renamed-dir.sh b/t/t9121-git-svn-fetch-renamed-dir.sh\nindex 5143ed6..f6a5d64 100755\n--- a/t/t9121-git-svn-fetch-renamed-dir.sh\n+++ b/t/t9121-git-svn-fetch-renamed-dir.sh\n@@ -8,11 +8,11 @@ test_description='git-svn can fetch renamed directories'\n . ./lib-git-svn.sh\n \n test_expect_success 'load repository with renamed directory' \"\n-\tsvnadmin load -q $rawsvnrepo < ../t9121/renamed-dir.dump\n+\tsvnadmin load -q '$rawsvnrepo' < ../t9121/renamed-dir.dump\n \t\"\n \n test_expect_success 'init and fetch repository' \"\n-\tgit svn init $svnrepo/newname &&\n+\tgit svn init '$svnrepo/newname' &&\n \tgit svn fetch\n \t\"\n \ndiff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh\nindex 166b43f..57cba8b 100755\n--- a/t/t9400-git-cvsserver-server.sh\n+++ b/t/t9400-git-cvsserver-server.sh\n@@ -24,8 +24,8 @@ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {\n }\n \n unset GIT_DIR GIT_CONFIG\n-WORKDIR=$(pwd)\n-SERVERDIR=$(pwd)/gitcvs.git\n+WORKDIR=\"$(pwd)\"\n+SERVERDIR=\"$(pwd)/gitcvs.git\"\n git_config=\"$SERVERDIR/config\"\n CVSROOT=\":fork:$SERVERDIR\"\n CVSWORK=\"$(pwd)/cvswork\"\n@@ -153,21 +153,21 @@ test_expect_success 'req_Root failure (conflicting roots)' \\\n    tail log | grep \"^error 1 Conflicting roots specified$\"'\n \n test_expect_success 'req_Root (strict paths)' \\\n-  'cat request-anonymous | git-cvsserver --strict-paths pserver $SERVERDIR >log 2>&1 &&\n+  'cat request-anonymous | git-cvsserver --strict-paths pserver \"$SERVERDIR\" >log 2>&1 &&\n    sed -ne \\$p log | grep \"^I LOVE YOU$\"'\n \n test_expect_success 'req_Root failure (strict-paths)' '\n     ! cat request-anonymous |\n-    git-cvsserver --strict-paths pserver $WORKDIR >log 2>&1\n+    git-cvsserver --strict-paths pserver \"$WORKDIR\" >log 2>&1\n '\n \n test_expect_success 'req_Root (w/o strict-paths)' \\\n-  'cat request-anonymous | git-cvsserver pserver $WORKDIR/ >log 2>&1 &&\n+  'cat request-anonymous | git-cvsserver pserver \"$WORKDIR\"/ >log 2>&1 &&\n    sed -ne \\$p log | grep \"^I LOVE YOU$\"'\n \n test_expect_success 'req_Root failure (w/o strict-paths)' '\n     ! cat request-anonymous |\n-    git-cvsserver pserver $WORKDIR/gitcvs >log 2>&1\n+    git-cvsserver pserver \"$WORKDIR\"/gitcvs >log 2>&1\n '\n \n cat >request-base  <<EOF\n@@ -180,25 +180,25 @@ Root /gitcvs.git\n EOF\n \n test_expect_success 'req_Root (base-path)' \\\n-  'cat request-base | git-cvsserver --strict-paths --base-path $WORKDIR/ pserver $SERVERDIR >log 2>&1 &&\n+  'cat request-base | git-cvsserver --strict-paths --base-path \"$WORKDIR\"/ pserver \"$SERVERDIR\" >log 2>&1 &&\n    sed -ne \\$p log | grep \"^I LOVE YOU$\"'\n \n test_expect_success 'req_Root failure (base-path)' '\n     ! cat request-anonymous |\n-    git-cvsserver --strict-paths --base-path $WORKDIR pserver $SERVERDIR >log 2>&1\n+    git-cvsserver --strict-paths --base-path \"$WORKDIR\" pserver \"$SERVERDIR\" >log 2>&1\n '\n \n GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled false || exit 1\n \n test_expect_success 'req_Root (export-all)' \\\n-  'cat request-anonymous | git-cvsserver --export-all pserver $WORKDIR >log 2>&1 &&\n+  'cat request-anonymous | git-cvsserver --export-all pserver \"$WORKDIR\" >log 2>&1 &&\n    sed -ne \\$p log | grep \"^I LOVE YOU$\"'\n \n test_expect_success 'req_Root failure (export-all w/o whitelist)' \\\n   '! (cat request-anonymous | git-cvsserver --export-all pserver >log 2>&1 || false)'\n \n test_expect_success 'req_Root (everything together)' \\\n-  'cat request-base | git-cvsserver --export-all --strict-paths --base-path $WORKDIR/ pserver $SERVERDIR >log 2>&1 &&\n+  'cat request-base | git-cvsserver --export-all --strict-paths --base-path \"$WORKDIR\"/ pserver \"$SERVERDIR\" >log 2>&1 &&\n    sed -ne \\$p log | grep \"^I LOVE YOU$\"'\n \n GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled true || exit 1\ndiff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\nindex 061a259..5e486c7 100755\n--- a/t/t9500-gitweb-standalone-no-errors.sh\n+++ b/t/t9500-gitweb-standalone-no-errors.sh\n@@ -45,13 +45,13 @@ gitweb_run () {\n \texport QUERY_STRING=\"\"$1\"\"\n \texport PATH_INFO=\"\"$2\"\"\n \n-\texport GITWEB_CONFIG=$(pwd)/gitweb_config.perl\n+\texport GITWEB_CONFIG=\"$(pwd)\"/gitweb_config.perl\n \n \t# some of git commands write to STDERR on error, but this is not\n \t# written to web server logs, so we are not interested in that:\n \t# we are interested only in properly formatted errors/warnings\n \trm -f gitweb.log &&\n-\tperl -- $(pwd)/../../gitweb/gitweb.perl \\\n+\tperl -- \"$(pwd)\"/../../gitweb/gitweb.perl \\\n \t\t>/dev/null 2>gitweb.log &&\n \tif grep -q -s \"^[[]\" gitweb.log >/dev/null; then false; else true; fi\n \ndiff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh\nindex 00a74ee..a65147b 100755\n--- a/t/t9600-cvsimport.sh\n+++ b/t/t9600-cvsimport.sh\n@@ -3,10 +3,10 @@\n test_description='git-cvsimport basic tests'\n . ./test-lib.sh\n \n-CVSROOT=$(pwd)/cvsroot\n+CVSROOT=\"$(pwd)\"/cvsroot\n export CVSROOT\n # for clean cvsps cache\n-HOME=$(pwd)\n+HOME=\"$(pwd)\"\n export HOME\n \n if ! type cvs >/dev/null 2>&1\n@@ -36,7 +36,7 @@ test_expect_success 'setup cvsroot' 'cvs init'\n \n test_expect_success 'setup a cvs module' '\n \n-\tmkdir $CVSROOT/module &&\n+\tmkdir \"$CVSROOT\"/module &&\n \tcvs co -d module-cvs module &&\n \tcd module-cvs &&\n \tcat <<EOF >o_fortuna &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 7c2a8ba..8065776 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -329,7 +329,7 @@ test_create_repo () {\n \trepo=\"$1\"\n \tmkdir \"$repo\"\n \tcd \"$repo\" || error \"Cannot setup test environment\"\n-\t\"$GIT_EXEC_PATH/git\" init --template=$GIT_EXEC_PATH/templates/blt/ >/dev/null 2>&1 ||\n+\t\"$GIT_EXEC_PATH\"/git init --template=\"$GIT_EXEC_PATH\"/templates/blt/ >/dev/null 2>&1 ||\n \terror \"cannot run git init -- have you built things yet?\"\n \tmv .git/hooks .git/hooks-disabled\n \tcd \"$owd\"\n@@ -371,16 +371,16 @@ test_done () {\n \n # Test the binaries we have just built.  The tests are kept in\n # t/ subdirectory and are run in trash subdirectory.\n-PATH=$(pwd)/..:$PATH\n-GIT_EXEC_PATH=$(pwd)/..\n-GIT_TEMPLATE_DIR=$(pwd)/../templates/blt\n+PATH=\"$(pwd)\"/..:$PATH\n+GIT_EXEC_PATH=\"$(pwd)\"/..\n+GIT_TEMPLATE_DIR=\"$(pwd)\"/../templates/blt\n unset GIT_CONFIG\n unset GIT_CONFIG_LOCAL\n GIT_CONFIG_NOSYSTEM=1\n GIT_CONFIG_NOGLOBAL=1\n export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_CONFIG_NOGLOBAL\n \n-GITPERLLIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git\n+GITPERLLIB=\"$(pwd)\"/../perl/blib/lib:\"$(pwd)\"/../perl/blib/arch/auto/Git\n export GITPERLLIB\n test -d ../templates/blt || {\n \terror \"You haven't built things yet, have you?\"\n-- \n1.5.5.67.g9a49\n"},{"id":"75015","messageId":"20080422230738.GD26950@dpotapov.dyndns.org","threadId":"13220","inReplyTo":"20080422212801.GB20417@regex.yaph.org","subject":"Re: [PATCH] Have tests and programs understand paths containing spaces","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-04-22T23:07:38Z","receivedAt":"2008-04-22T23:07:38Z","isPatch":true,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Tue, Apr 22, 2008 at 11:28:01PM +0200, Arjen Laarhoven wrote:\n> \n> diff --git a/builtin-tag.c b/builtin-tag.c\n> index 129ff57..2d04d4f 100644\n> --- a/builtin-tag.c\n> +++ b/builtin-tag.c\n> @@ -55,7 +55,7 @@ void launch_editor(const char *path, struct strbuf *buffer, const char *const *e\n>  \t\tstrbuf_init(&arg0, 0);\n>  \t\tif (strcspn(editor, \"$ \\t'\") != len) {\n>  \t\t\t/* there are specials */\n> -\t\t\tstrbuf_addf(&arg0, \"%s \\\"$@\\\"\", editor);\n> +\t\t\tstrbuf_addf(&arg0, \"'%s' \\\"$@\\\"\", editor);\n\nThis change has been already discussed on the mail, and I believe it\nwas ultimately rejected, because it will break things for people using\nsomething like that: GIT_EDITOR='emacs -nw'. If you have spaces in the\npath to your editor, you should quote in the definition of the editor:\n\ngit config core.editor '\"c:/Program Files/What/Ever.exe\"'\n\nThus, by putting extra quotes will break things for people who uses some\ntheir favorite editor with extra options and for those who already use an\neditor from c:/Program Files on Windows.\n\n> diff --git a/git-send-email.perl b/git-send-email.perl\n> index 9e568bf..40a521a 100755\n> --- a/git-send-email.perl\n> +++ b/git-send-email.perl\n> @@ -512,7 +512,7 @@ EOT\n>  \tclose(C);\n>  \n>  \tmy $editor = $ENV{GIT_EDITOR} || Git::config(@repo, \"core.editor\") || $ENV{VISUAL} || $ENV{EDITOR} || \"vi\";\n> -\tsystem('sh', '-c', '$0 $@', $editor, $compose_filename);\n> +\tsystem('sh', '-c', '\"$0\" $@', $editor, $compose_filename);\n\nSee above.\n\n>  \n>  \topen(C2,\">\",$compose_filename . \".final\")\n>  \t\tor die \"Failed to open $compose_filename.final : \" . $!;\n> diff --git a/git-sh-setup.sh b/git-sh-setup.sh\n> index a44b1c7..a8a024b 100755\n> --- a/git-sh-setup.sh\n> +++ b/git-sh-setup.sh\n> @@ -73,7 +73,7 @@ git_editor() {\n>  \t\texit 1\n>  \t\t;;\n>  \tesac\n> -\teval \"${GIT_EDITOR:=vi}\" '\"$@\"'\n> +\teval '\"${GIT_EDITOR:=vi}\"' '\"$@\"'\n\nSee above.\n\n\nDmitry\n"},{"id":"75038","messageId":"480EE180.1050202@viscovery.net","threadId":"13220","inReplyTo":"20080422212801.GB20417@regex.yaph.org","subject":"Re: [PATCH] Have tests and programs understand paths containing spaces","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-04-23T07:13:04Z","receivedAt":"2008-04-23T07:13:04Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Arjen Laarhoven schrieb:\n> A lot of tests and some core programs didn't work when used in a path\n> containing whitespace.  Correct the quoting of all affected programs to\n> fix this.\n\nPlease separate fixes of core programs/scripts from fixes of the tests\n(because the former have a much higher chance of being accepted).\n\nBut see these threads first:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/60544\nhttp://thread.gmane.org/gmane.comp.version-control.git/79057\n\n\nHere a few comments:\n\n> +GIT_DIR=\"$PWD/.git\"\n> +GIT_SVN_DIR=\"$GIT_DIR/svn/git-svn\"\n> +SVN_TREE=\"$GIT_SVN_DIR/svn-tree\"\n> +svnrepo=\"$PWD/svnrepo\"\n\nThese are unnecessary: RHS of an assignment does not undergo word splitting.\n\n> -test_expect_success \"checkout from svn\" \"svn co $svnrepo '$SVN_TREE'\"\n> +test_expect_success \"checkout from svn\" \"svn co '$svnrepo' '$SVN_TREE'\"\n\n> -\tgit diff help $SVN_TREE/exec-2.sh\"\n> +\tgit diff help '$SVN_TREE'/exec-2.sh\"\n\nThese changes protect *only* against space-in-name, but not\nrandom-special-character-in-name. The proper fix is to change the quoting from\n\n  test_expect_success \"...\" \"... $svnrepo ...\"\n\nto\n\n  test_expect_success '...' '... \"$svnrepo\" ...'\n\n-- Hannes\n"}]}