{"thread":{"id":"48487","subject":"[PATCH] t7005-editor: get rid of the SPACES_IN_FILENAMES prereq","startedAt":"2018-05-14T10:28:33Z","lastAt":"2018-05-18T21:39:28Z","messageCount":3,"participants":["SZEDER Gábor","Eric Sunshine","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"347580","messageId":"20180514102812.7924-1-szeder.dev@gmail.com","threadId":"48487","inReplyTo":null,"subject":"[PATCH] t7005-editor: get rid of the SPACES_IN_FILENAMES prereq","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2018-05-14T10:28:12Z","receivedAt":"2018-05-14T10:28:33Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"The last two tests 'editor with a space' and 'core.editor with a\nspace' in 't7005-editor.sh' need the SPACES_IN_FILENAMES prereq to\nensure that they are only run on filesystems that allow, well, spaces\nin filesnames.  However, we have been putting a space in the name of\nthe trash directory for just over a decade now, so we wouldn't be able\nto run any of our tests on such a filesystem in the first place.\n\nThis prereq is therefore unnecessary, remove it.\n\nSigned-off-by: SZEDER Gábor <szeder.dev@gmail.com>\n---\n t/t7005-editor.sh | 12 +++---------\n 1 file changed, 3 insertions(+), 9 deletions(-)\n\ndiff --git a/t/t7005-editor.sh b/t/t7005-editor.sh\nindex 29e5043b94..b2ca77b338 100755\n--- a/t/t7005-editor.sh\n+++ b/t/t7005-editor.sh\n@@ -111,14 +111,8 @@ do\n \t'\n done\n \n-if echo 'echo space > \"$1\"' > \"e space.sh\"\n-then\n-\t# FS supports spaces in filenames\n-\ttest_set_prereq SPACES_IN_FILENAMES\n-fi\n-\n-test_expect_success SPACES_IN_FILENAMES 'editor with a space' '\n-\n+test_expect_success 'editor with a space' '\n+\techo \"echo space >\\$1\" >\"e space.sh\" &&\n \tchmod a+x \"e space.sh\" &&\n \tGIT_EDITOR=\"./e\\ space.sh\" git commit --amend &&\n \ttest space = \"$(git show -s --pretty=format:%s)\"\n@@ -126,7 +120,7 @@ test_expect_success SPACES_IN_FILENAMES 'editor with a space' '\n '\n \n unset GIT_EDITOR\n-test_expect_success SPACES_IN_FILENAMES 'core.editor with a space' '\n+test_expect_success 'core.editor with a space' '\n \n \tgit config core.editor \\\"./e\\ space.sh\\\" &&\n \tgit commit --amend &&\n-- \n2.17.0.756.gcf614c5aff\n\n"},{"id":"347614","messageId":"CAPig+cRx8WZ1+DoxoJV3w+568DN=XqLMnfT8vmL8tb5FrzvWLw@mail.gmail.com","threadId":"48487","inReplyTo":"20180514102812.7924-1-szeder.dev@gmail.com","subject":"Re: [PATCH] t7005-editor: get rid of the SPACES_IN_FILENAMES prereq","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-05-14T17:41:14Z","receivedAt":"2018-05-14T17:41:19Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, May 14, 2018 at 6:28 AM, SZEDER Gábor <szeder.dev@gmail.com> wrote:\n> The last two tests 'editor with a space' and 'core.editor with a\n> space' in 't7005-editor.sh' need the SPACES_IN_FILENAMES prereq to\n> ensure that they are only run on filesystems that allow, well, spaces\n> in filesnames.  However, we have been putting a space in the name of\n\ns filesnames/filenames/\n\n> the trash directory for just over a decade now, so we wouldn't be able\n> to run any of our tests on such a filesystem in the first place.\n>\n> This prereq is therefore unnecessary, remove it.\n>\n> Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>\n"},{"id":"348008","messageId":"20180518213903.GC21797@sigill.intra.peff.net","threadId":"48487","inReplyTo":"20180514102812.7924-1-szeder.dev@gmail.com","subject":"Re: [PATCH] t7005-editor: get rid of the SPACES_IN_FILENAMES prereq","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-05-18T21:39:04Z","receivedAt":"2018-05-18T21:39:28Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, May 14, 2018 at 12:28:12PM +0200, SZEDER Gábor wrote:\n\n> The last two tests 'editor with a space' and 'core.editor with a\n> space' in 't7005-editor.sh' need the SPACES_IN_FILENAMES prereq to\n> ensure that they are only run on filesystems that allow, well, spaces\n> in filesnames.  However, we have been putting a space in the name of\n> the trash directory for just over a decade now, so we wouldn't be able\n> to run any of our tests on such a filesystem in the first place.\n> \n> This prereq is therefore unnecessary, remove it.\n\nI wondered if there might be some platforms that tweak the test\nenvironment in such a way that we skip the space in \"trash directory\".\nBut looking at test-lib.sh, I don't think there is any easy way to do so\n(e.g., you can't just set $TEST_DIRECTORY_NAME or something). So this\ndoes seem safe, and it's nice to reduce unnecessary complexity.\n\n-Peff\n"}]}