{"thread":{"id":"50768","subject":"[PATCH] t4038-diff-combined: quote paths with whitespace","startedAt":"2019-03-17T23:02:48Z","lastAt":"2019-03-18T15:38:36Z","messageCount":4,"participants":["Todd Zullinger","Eric Sunshine","Junio C Hamano","Elijah Newren"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"371753","messageId":"20190317230239.10131-1-tmz@pobox.com","threadId":"50768","inReplyTo":null,"subject":"[PATCH] t4038-diff-combined: quote paths with whitespace","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2019-03-17T23:02:39Z","receivedAt":"2019-03-17T23:02:48Z","isPatch":true,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"d76ce4f734 (\"log,diff-tree: add --combined-all-paths option\",\n2019-02-07) added tests for files containing tabs.\n\nWhen the tests are run with bash, the lack of quoting during the file\nsetup causes 'ambiguous redirect' errors.\n\nSigned-off-by: Todd Zullinger <tmz@pobox.com>\n---\nHi,\n\nI noticed these failures while running in a repo where I happened\nto have TEST_SHELL_PATH=/bin/bash set.  I wonder if we should\nhave a test matrix which uses bash to catch these sort of things?\n\n t/t4038-diff-combined.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh\nindex 07b49f6d6d..d4afe12554 100755\n--- a/t/t4038-diff-combined.sh\n+++ b/t/t4038-diff-combined.sh\n@@ -480,18 +480,18 @@ test_expect_success FUNNYNAMES 'setup for --combined-all-paths with funny names'\n \tgit branch side1d &&\n \tgit branch side2d &&\n \tgit checkout side1d &&\n-\ttest_seq 1 10 >$(printf \"file\\twith\\ttabs\") &&\n+\ttest_seq 1 10 >\"$(printf \"file\\twith\\ttabs\")\" &&\n \tgit add file* &&\n \tgit commit -m with &&\n \tgit checkout side2d &&\n-\ttest_seq 1 9 >$(printf \"i\\tam\\ttabbed\") &&\n-\techo ten >>$(printf \"i\\tam\\ttabbed\") &&\n+\ttest_seq 1 9 >\"$(printf \"i\\tam\\ttabbed\")\" &&\n+\techo ten >>\"$(printf \"i\\tam\\ttabbed\")\" &&\n \tgit add *tabbed &&\n \tgit commit -m iam &&\n \tgit checkout -b funny-names-mergery side1d &&\n \tgit merge --no-commit side2d &&\n \tgit rm *tabs &&\n-\techo eleven >>$(printf \"i\\tam\\ttabbed\") &&\n+\techo eleven >>\"$(printf \"i\\tam\\ttabbed\")\" &&\n \tgit mv \"$(printf \"i\\tam\\ttabbed\")\" \"$(printf \"fickle\\tnaming\")\" &&\n \tgit add fickle* &&\n \tgit commit\n-- \nTodd\n"},{"id":"371754","messageId":"CAPig+cR5uqE+9smKcvZr0oaw2XyqWsYORwAga4WLUX5N+hU4bA@mail.gmail.com","threadId":"50768","inReplyTo":"20190317230239.10131-1-tmz@pobox.com","subject":"Re: [PATCH] t4038-diff-combined: quote paths with whitespace","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2019-03-17T23:11:18Z","receivedAt":"2019-03-17T23:11:32Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sun, Mar 17, 2019 at 7:02 PM Todd Zullinger <tmz@pobox.com> wrote:\n> d76ce4f734 (\"log,diff-tree: add --combined-all-paths option\",\n> 2019-02-07) added tests for files containing tabs.\n\ns/files/filenames/\n\n> When the tests are run with bash, the lack of quoting during the file\n> setup causes 'ambiguous redirect' errors.\n>\n> Signed-off-by: Todd Zullinger <tmz@pobox.com>\n> ---\n>\n> I noticed these failures while running in a repo where I happened\n> to have TEST_SHELL_PATH=/bin/bash set.  I wonder if we should\n> have a test matrix which uses bash to catch these sort of things?\n\nMaybe just extending \"make test-lint\" to catch these would suffice.\n"},{"id":"371785","messageId":"xmqqwokw1xpw.fsf@gitster-ct.c.googlers.com","threadId":"50768","inReplyTo":"20190317230239.10131-1-tmz@pobox.com","subject":"Re: [PATCH] t4038-diff-combined: quote paths with whitespace","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-03-18T06:51:55Z","receivedAt":"2019-03-18T06:51:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Todd Zullinger <tmz@pobox.com> writes:\n\n> d76ce4f734 (\"log,diff-tree: add --combined-all-paths option\",\n> 2019-02-07) added tests for files containing tabs.\n>\n> When the tests are run with bash, the lack of quoting during the file\n> setup causes 'ambiguous redirect' errors.\n\nThanks.\n"},{"id":"371816","messageId":"CABPp-BGY_SSJ5GsCz09jDgBzX9Xmbpd95bYcfK4FbpHfgNQgRQ@mail.gmail.com","threadId":"50768","inReplyTo":"20190317230239.10131-1-tmz@pobox.com","subject":"Re: [PATCH] t4038-diff-combined: quote paths with whitespace","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2019-03-18T15:38:21Z","receivedAt":"2019-03-18T15:38:36Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Sun, Mar 17, 2019 at 4:02 PM Todd Zullinger <tmz@pobox.com> wrote:\n>\n> d76ce4f734 (\"log,diff-tree: add --combined-all-paths option\",\n> 2019-02-07) added tests for files containing tabs.\n>\n> When the tests are run with bash, the lack of quoting during the file\n> setup causes 'ambiguous redirect' errors.\n>\n> Signed-off-by: Todd Zullinger <tmz@pobox.com>\n> ---\n> Hi,\n>\n> I noticed these failures while running in a repo where I happened\n> to have TEST_SHELL_PATH=/bin/bash set.  I wonder if we should\n> have a test matrix which uses bash to catch these sort of things?\n>\n>  t/t4038-diff-combined.sh | 8 ++++----\n>  1 file changed, 4 insertions(+), 4 deletions(-)\n>\n> diff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh\n> index 07b49f6d6d..d4afe12554 100755\n> --- a/t/t4038-diff-combined.sh\n> +++ b/t/t4038-diff-combined.sh\n> @@ -480,18 +480,18 @@ test_expect_success FUNNYNAMES 'setup for --combined-all-paths with funny names'\n>         git branch side1d &&\n>         git branch side2d &&\n>         git checkout side1d &&\n> -       test_seq 1 10 >$(printf \"file\\twith\\ttabs\") &&\n> +       test_seq 1 10 >\"$(printf \"file\\twith\\ttabs\")\" &&\n>         git add file* &&\n>         git commit -m with &&\n>         git checkout side2d &&\n> -       test_seq 1 9 >$(printf \"i\\tam\\ttabbed\") &&\n> -       echo ten >>$(printf \"i\\tam\\ttabbed\") &&\n> +       test_seq 1 9 >\"$(printf \"i\\tam\\ttabbed\")\" &&\n> +       echo ten >>\"$(printf \"i\\tam\\ttabbed\")\" &&\n>         git add *tabbed &&\n>         git commit -m iam &&\n>         git checkout -b funny-names-mergery side1d &&\n>         git merge --no-commit side2d &&\n>         git rm *tabs &&\n> -       echo eleven >>$(printf \"i\\tam\\ttabbed\") &&\n> +       echo eleven >>\"$(printf \"i\\tam\\ttabbed\")\" &&\n>         git mv \"$(printf \"i\\tam\\ttabbed\")\" \"$(printf \"fickle\\tnaming\")\" &&\n>         git add fickle* &&\n>         git commit\n> --\n\nWhoops, how embarrassing.  Thanks for fixing this.\n"}]}