{"thread":{"id":"52080","subject":"[PATCH] t4014: make output-directory tests self-contained","startedAt":"2019-10-21T13:23:48Z","lastAt":"2019-10-21T13:23:48Z","messageCount":1,"participants":["Bert Wesarg"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"384507","messageId":"8451a4dac2e1dfaae130786444531ad85807fdf7.1571664168.git.bert.wesarg@googlemail.com","threadId":"52080","inReplyTo":null,"subject":"[PATCH] t4014: make output-directory tests self-contained","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-10-21T13:23:42Z","receivedAt":"2019-10-21T13:23:48Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"As noted by Gábor in [1], the new tests in edefc31873 (\"format-patch:\ncreate leading components of output directory\", 2019-10-11) cannot be\nrun independently. Fix this.\n\n[1] https://public-inbox.org/git/20191011144650.GM29845@szeder.dev/\n\nSigned-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n---\nCc: Denton Liu <liu.denton@gmail.com>\nCc: Junio C Hamano <gitster@pobox.com>\nCc: SZEDER Gábor <szeder.dev@gmail.com>\n---\n t/t4014-format-patch.sh | 13 ++++++++-----\n 1 file changed, 8 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh\nindex 9facc3a79e..b8969998b5 100755\n--- a/t/t4014-format-patch.sh\n+++ b/t/t4014-format-patch.sh\n@@ -1615,17 +1615,20 @@ test_expect_success 'format-patch -o with no leading directories' '\n '\n \n test_expect_success 'format-patch -o with leading existing directories' '\n-\tgit format-patch -o patches/side master..side &&\n+\trm -rf existing-dir &&\n+\tmkdir existing-dir &&\n+\tgit format-patch -o existing-dir/patches master..side &&\n \tcount=$(git rev-list --count master..side) &&\n-\tls patches/side >list &&\n+\tls existing-dir/patches >list &&\n \ttest_line_count = $count list\n '\n \n test_expect_success 'format-patch -o with leading non-existing directories' '\n-\trm -fr patches &&\n-\tgit format-patch -o patches/side master..side &&\n+\trm -rf non-existing-dir &&\n+\tgit format-patch -o non-existing-dir/patches master..side &&\n \tcount=$(git rev-list --count master..side) &&\n-\tls patches/side >list &&\n+\ttest_path_is_dir non-existing-dir &&\n+\tls non-existing-dir/patches >list &&\n \ttest_line_count = $count list\n '\n \n-- \n2.23.0.13.g28bc381d7c\n\n"}]}