{"thread":{"id":"47532","subject":"[PATCH 0/2] Several fixes for the test suite related to spaces in filenames","startedAt":"2018-01-03T16:54:56Z","lastAt":"2018-01-04T00:22:47Z","messageCount":5,"participants":["Johannes Schindelin","Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"335762","messageId":"cover.1514998470.git.johannes.schindelin@gmx.de","threadId":"47532","inReplyTo":null,"subject":"[PATCH 0/2] Several fixes for the test suite related to spaces in filenames","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-01-03T16:54:44Z","receivedAt":"2018-01-03T16:54:56Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"The second issue was found long ago, and the patch carried in Git for\nWindows, although nothing about it is specific to Windows.\n\nThe first patch was developed today, when I tried to verify that Git's\ntest suite passes if Git is cloned to a directory called `with spaces/`.\n\n\nJohannes Schindelin (2):\n  Allow the test suite to pass in a directory whose name contains spaces\n  t0302 & t3900: add forgotten quotes\n\n t/t0302-credential-store.sh | 2 +-\n t/t3900-i18n-commit.sh      | 8 ++++----\n t/t7500-commit.sh           | 4 ++--\n t/t9020-remote-svn.sh       | 4 ++--\n t/t9107-git-svn-migrate.sh  | 2 +-\n 5 files changed, 10 insertions(+), 10 deletions(-)\n\n\nbase-commit: 1eaabe34fc6f486367a176207420378f587d3b48\nPublished-As: https://github.com/dscho/git/releases/tag/with-spaces-v1\nFetch-It-Via: git fetch https://github.com/dscho/git with-spaces-v1\n-- \n2.15.1.windows.2.391.g0b42e3c56de\n\n"},{"id":"335763","messageId":"8d8cb562dcfa3faf65c7427c398158ec29e6fdbc.1514998470.git.johannes.schindelin@gmx.de","threadId":"47532","inReplyTo":"cover.1514998470.git.johannes.schindelin@gmx.de","subject":"[PATCH 1/2] Allow the test suite to pass in a directory whose name contains spaces","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-01-03T16:54:50Z","receivedAt":"2018-01-03T16:55:01Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"It is totally legitimate to clone Git's source code anywhere, including\ninto, say, directories whose name (or the name of its absolute path)\ncontains spaces.\n\nHowever, a couple of tests failed to anticipate this, for lack of\nquoting (or in one instance, for failure to expect more than one space\nin the absolute path of the TEST_DIRECTORY). This can be easily verified\nby calling these commands in your current clone:\n\n\tgit clone . with\\ spaces\n\tcd with\\ spaces\n\tmake -j15 test\n\nLet's fix this.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t7500-commit.sh          | 4 ++--\n t/t9020-remote-svn.sh      | 4 ++--\n t/t9107-git-svn-migrate.sh | 2 +-\n 3 files changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t7500-commit.sh b/t/t7500-commit.sh\nindex 5739d3ed232..1d33c5feb3e 100755\n--- a/t/t7500-commit.sh\n+++ b/t/t7500-commit.sh\n@@ -130,8 +130,8 @@ EOF\n test_expect_success 'commit message from template with whitespace issue' '\n \techo \"content galore\" >>foo &&\n \tgit add foo &&\n-\tGIT_EDITOR=\"$TEST_DIRECTORY\"/t7500/add-whitespaced-content git commit \\\n-\t\t--template \"$TEMPLATE\" &&\n+\tGIT_EDITOR=\\\"\"$TEST_DIRECTORY\"\\\"/t7500/add-whitespaced-content \\\n+\tgit commit --template \"$TEMPLATE\" &&\n \tcommit_msg_is \"commit message\"\n '\n \ndiff --git a/t/t9020-remote-svn.sh b/t/t9020-remote-svn.sh\nindex 4d81ba1c2c4..6fca08e5e35 100755\n--- a/t/t9020-remote-svn.sh\n+++ b/t/t9020-remote-svn.sh\n@@ -25,8 +25,8 @@ init_git () {\n \tgit init &&\n \t#git remote add svnsim testsvn::sim:///$TEST_DIRECTORY/t9020/example.svnrdump\n \t# let's reuse an existing dump file!?\n-\tgit remote add svnsim testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump\n-\tgit remote add svnfile testsvn::file://$TEST_DIRECTORY/t9154/svn.dump\n+\tgit remote add svnsim \"testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump\"\n+\tgit remote add svnfile \"testsvn::file://$TEST_DIRECTORY/t9154/svn.dump\"\n }\n \n if test -e \"$GIT_BUILD_DIR/git-remote-testsvn\"\ndiff --git a/t/t9107-git-svn-migrate.sh b/t/t9107-git-svn-migrate.sh\nindex 9f3ef8f2ef6..ceaa5bad105 100755\n--- a/t/t9107-git-svn-migrate.sh\n+++ b/t/t9107-git-svn-migrate.sh\n@@ -28,7 +28,7 @@ test_expect_success 'git-svn-HEAD is a real HEAD' '\n \tgit rev-parse --verify refs/heads/git-svn-HEAD^0\n '\n \n-svnrepo_escaped=$(echo $svnrepo | sed 's/ /%20/')\n+svnrepo_escaped=$(echo $svnrepo | sed 's/ /%20/g')\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-- \n2.15.1.windows.2.391.g0b42e3c56de\n\n\n"},{"id":"335764","messageId":"2b7912156d94eff38c130403fcf831b5f8d5bd4d.1514998471.git.johannes.schindelin@gmx.de","threadId":"47532","inReplyTo":"cover.1514998470.git.johannes.schindelin@gmx.de","subject":"[PATCH 2/2] t0302 & t3900: add forgotten quotes","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-01-03T16:54:54Z","receivedAt":"2018-01-03T16:55:04Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"When cleaning up files in the $HOME directory, it really makes sense to\nquote the path, especially in Git's test suite, where the HOME directory\nis *guaranteed* to contain spaces in its name.\n\nIt would appear that those two tests pass even without cleaning up the\nfiles, but really more by pure chance than by design (the cleanup seems\nnot actually to be necessary).\n\nHowever, if anybody would have a left-over `trash/` directory in Git's\n`t/` directory, these tests would fail, because they would all of a\nsudden try to delete that directory, but without the `-r` (recursive)\nflag. That is how this issue was found.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t0302-credential-store.sh | 2 +-\n t/t3900-i18n-commit.sh      | 8 ++++----\n 2 files changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t0302-credential-store.sh b/t/t0302-credential-store.sh\nindex 1d8d1f210b9..d6b54e8c65a 100755\n--- a/t/t0302-credential-store.sh\n+++ b/t/t0302-credential-store.sh\n@@ -37,7 +37,7 @@ helper_test store\n unset XDG_CONFIG_HOME\n \n test_expect_success 'if custom xdg file exists, home and xdg files not created' '\n-\ttest_when_finished \"rm -f $HOME/xdg/git/credentials\" &&\n+\ttest_when_finished \"rm -f \\\"$HOME/xdg/git/credentials\\\"\" &&\n \ttest -s \"$HOME/xdg/git/credentials\" &&\n \ttest_path_is_missing \"$HOME/.git-credentials\" &&\n \ttest_path_is_missing \"$HOME/.config/git/credentials\"\ndiff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh\nindex 3b94283e355..9e4e694d939 100755\n--- a/t/t3900-i18n-commit.sh\n+++ b/t/t3900-i18n-commit.sh\n@@ -40,7 +40,7 @@ test_expect_success 'UTF-16 refused because of NULs' '\n '\n \n test_expect_success 'UTF-8 invalid characters refused' '\n-\ttest_when_finished \"rm -f $HOME/stderr $HOME/invalid\" &&\n+\ttest_when_finished \"rm -f \\\"$HOME/stderr $HOME/invalid\\\"\" &&\n \techo \"UTF-8 characters\" >F &&\n \tprintf \"Commit message\\n\\nInvalid surrogate:\\355\\240\\200\\n\" \\\n \t\t>\"$HOME/invalid\" &&\n@@ -49,7 +49,7 @@ test_expect_success 'UTF-8 invalid characters refused' '\n '\n \n test_expect_success 'UTF-8 overlong sequences rejected' '\n-\ttest_when_finished \"rm -f $HOME/stderr $HOME/invalid\" &&\n+\ttest_when_finished \"rm -f \\\"$HOME/stderr $HOME/invalid\\\"\" &&\n \trm -f \"$HOME/stderr\" \"$HOME/invalid\" &&\n \techo \"UTF-8 overlong\" >F &&\n \tprintf \"\\340\\202\\251ommit message\\n\\nThis is not a space:\\300\\240\\n\" \\\n@@ -59,7 +59,7 @@ test_expect_success 'UTF-8 overlong sequences rejected' '\n '\n \n test_expect_success 'UTF-8 non-characters refused' '\n-\ttest_when_finished \"rm -f $HOME/stderr $HOME/invalid\" &&\n+\ttest_when_finished \"rm -f \\\"$HOME/stderr $HOME/invalid\\\"\" &&\n \techo \"UTF-8 non-character 1\" >F &&\n \tprintf \"Commit message\\n\\nNon-character:\\364\\217\\277\\276\\n\" \\\n \t\t>\"$HOME/invalid\" &&\n@@ -68,7 +68,7 @@ test_expect_success 'UTF-8 non-characters refused' '\n '\n \n test_expect_success 'UTF-8 non-characters refused' '\n-\ttest_when_finished \"rm -f $HOME/stderr $HOME/invalid\" &&\n+\ttest_when_finished \"rm -f \\\"$HOME/stderr $HOME/invalid\\\"\" &&\n \techo \"UTF-8 non-character 2.\" >F &&\n \tprintf \"Commit message\\n\\nNon-character:\\357\\267\\220\\n\" \\\n \t\t>\"$HOME/invalid\" &&\n-- \n2.15.1.windows.2.391.g0b42e3c56de\n"},{"id":"335767","messageId":"20180103190844.GA30781@sigill.intra.peff.net","threadId":"47532","inReplyTo":"cover.1514998470.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH 0/2] Several fixes for the test suite related to spaces in filenames","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-01-03T19:08:45Z","receivedAt":"2018-01-03T19:08:51Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jan 03, 2018 at 05:54:44PM +0100, Johannes Schindelin wrote:\n\n> The second issue was found long ago, and the patch carried in Git for\n> Windows, although nothing about it is specific to Windows.\n> \n> The first patch was developed today, when I tried to verify that Git's\n> test suite passes if Git is cloned to a directory called `with spaces/`.\n\nHeh, the whole point of the space in the trash directory was to find\nthese issues early, but obviously it is not foolproof. :)\n\nThe patches themselves look good to me from inspection. Thanks.\n\n-Peff\n"},{"id":"335808","messageId":"xmqqr2r6fp68.fsf@gitster.mtv.corp.google.com","threadId":"47532","inReplyTo":"20180103190844.GA30781@sigill.intra.peff.net","subject":"Re: [PATCH 0/2] Several fixes for the test suite related to spaces in filenames","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-01-04T00:22:39Z","receivedAt":"2018-01-04T00:22:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Wed, Jan 03, 2018 at 05:54:44PM +0100, Johannes Schindelin wrote:\n>\n>> The second issue was found long ago, and the patch carried in Git for\n>> Windows, although nothing about it is specific to Windows.\n>> \n>> The first patch was developed today, when I tried to verify that Git's\n>> test suite passes if Git is cloned to a directory called `with spaces/`.\n>\n> Heh, the whole point of the space in the trash directory was to find\n> these issues early, but obviously it is not foolproof. :)\n\nExactly.\n\n> The patches themselves look good to me from inspection. Thanks.\n\nYes, these changes look good.  Thanks both.\n"}]}