{"thread":{"id":"55868","subject":"[PATCH] t: fix whitespace around &&","startedAt":"2021-06-07T13:13:42Z","lastAt":"2021-06-07T18:48:11Z","messageCount":3,"participants":["Andrei Rybak","Derrick Stolee","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"426602","messageId":"20210607131320.982362-1-rybak.a.v@gmail.com","threadId":"55868","inReplyTo":null,"subject":"[PATCH] t: fix whitespace around &&","fromName":"Andrei Rybak","fromEmail":"rybak.a.v@gmail.com","sentAt":"2021-06-07T13:13:20Z","receivedAt":"2021-06-07T13:13:42Z","isPatch":true,"sender":{"key":"rybak.a.v@gmail.com","avatar":"https://avatars.githubusercontent.com/u/624072?v=4"},"body":"Add missing spaces before '&&' and switch tabs around '&&' to spaces.\n\nThese issues were found using `git grep '[^ ]&&$'` and\n`git grep -P '&&\\t'`.\n\nSigned-off-by: Andrei Rybak <rybak.a.v@gmail.com>\n---\n contrib/mw-to-git/t/t9360-mw-to-git-clone.sh | 2 +-\n contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh  | 4 ++--\n t/t1092-sparse-checkout-compatibility.sh     | 2 +-\n t/t3920-crlf-messages.sh                     | 2 +-\n t/t4203-mailmap.sh                           | 2 +-\n t/t4205-log-pretty-formats.sh                | 2 +-\n t/t7800-difftool.sh                          | 2 +-\n 7 files changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh b/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh\nindex 4c39bda7bf..f08890d9e7 100755\n--- a/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh\n+++ b/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh\n@@ -86,7 +86,7 @@ test_expect_success 'Git clone works with page added' '\n test_expect_success 'Git clone works with an edited page ' '\n \twiki_reset &&\n \twiki_editpage foo \"this page will be edited\" \\\n-\t\tfalse -s \"first edition of page foo\"&&\n+\t\tfalse -s \"first edition of page foo\" &&\n \twiki_editpage foo \"this page has been edited and must be on the clone \" true &&\n \tgit clone mediawiki::'\"$WIKI_URL\"' mw_dir_6 &&\n \ttest_path_is_file mw_dir_6/Foo.mw &&\ndiff --git a/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh b/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh\nindex 6b0dbdac4d..526d92850f 100755\n--- a/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh\n+++ b/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh\n@@ -287,7 +287,7 @@ test_expect_success 'git push with \\' '\n \t\tgit add \\\\ko\\\\o.mw &&\n \t\tgit commit -m \" \\\\ko\\\\o added\" &&\n \t\tgit push\n-\t)&&\n+\t) &&\n \twiki_page_exist \\\\ko\\\\o &&\n \twiki_check_content mw_dir_18/\\\\ko\\\\o.mw \\\\ko\\\\o\n \n@@ -311,7 +311,7 @@ test_expect_success 'git push with \\ in format control' '\n \t\tgit add \\\\fo\\\\o.mw &&\n \t\tgit commit -m \" \\\\fo\\\\o added\" &&\n \t\tgit push\n-\t)&&\n+\t) &&\n \twiki_page_exist \\\\fo\\\\o &&\n \twiki_check_content mw_dir_20/\\\\fo\\\\o.mw \\\\fo\\\\o\n \ndiff --git a/t/t1092-sparse-checkout-compatibility.sh b/t/t1092-sparse-checkout-compatibility.sh\nindex e9a815ca7a..d028b73eba 100755\n--- a/t/t1092-sparse-checkout-compatibility.sh\n+++ b/t/t1092-sparse-checkout-compatibility.sh\n@@ -268,7 +268,7 @@ test_expect_success 'diff with renames' '\n \tfor branch in rename-out-to-out rename-out-to-in rename-in-to-out\n \tdo\n \t\ttest_all_match git checkout rename-base &&\n-\t\ttest_all_match git checkout $branch -- .&&\n+\t\ttest_all_match git checkout $branch -- . &&\n \t\ttest_all_match git diff --staged --no-renames &&\n \t\ttest_all_match git diff --staged --find-renames || return 1\n \tdone\ndiff --git a/t/t3920-crlf-messages.sh b/t/t3920-crlf-messages.sh\nindex 70ddce3a2e..a8ad5462d9 100755\n--- a/t/t3920-crlf-messages.sh\n+++ b/t/t3920-crlf-messages.sh\n@@ -64,7 +64,7 @@ test_crlf_subject_body_and_contents() {\n \twhile test -n \"${atoms}\"\n \tdo\n \t\tset ${atoms} && atom=$1 && shift && atoms=\"$*\" &&\n-\t\tset ${files} &&\tfile=$1 && shift && files=\"$*\" &&\n+\t\tset ${files} && file=$1 && shift && files=\"$*\" &&\n \t\ttest_expect_success \"${command}: --format='%${atom}' works with messages using CRLF\" \"\n \t\t\trm -f expect &&\n \t\t\tfor ref in ${LIB_CRLF_BRANCHES}\ndiff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh\nindex d8e7374234..0b2d21ec55 100755\n--- a/t/t4203-mailmap.sh\n+++ b/t/t4203-mailmap.sh\n@@ -959,7 +959,7 @@ test_expect_success SYMLINKS 'symlinks not respected in-tree' '\n \ttest_when_finished \"rm .mailmap\" &&\n \tln -s map .mailmap &&\n \tgit log -1 --format=%aE >actual &&\n-\techo \"orig@example.com\" >expect&&\n+\techo \"orig@example.com\" >expect &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh\nindex 8272d94ce6..5865daa8f8 100755\n--- a/t/t4205-log-pretty-formats.sh\n+++ b/t/t4205-log-pretty-formats.sh\n@@ -988,7 +988,7 @@ test_expect_success '%(describe) vs git describe' '\n \n test_expect_success '%(describe:match=...) vs git describe --match ...' '\n \ttest_when_finished \"git tag -d tag-match\" &&\n-\tgit tag -a -m tagged tag-match&&\n+\tgit tag -a -m tagged tag-match &&\n \tgit describe --match \"*-match\" >expect &&\n \tgit log -1 --format=\"%(describe:match=*-match)\" >actual &&\n \ttest_cmp expect actual\ndiff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh\nindex 3e041e83ae..a173f564bc 100755\n--- a/t/t7800-difftool.sh\n+++ b/t/t7800-difftool.sh\n@@ -770,7 +770,7 @@ test_expect_success 'difftool --rotate-to' '\n \techo 4 >4 &&\n \tgit add 1 2 4 &&\n \tgit commit -a -m \"124\" &&\n-\tgit difftool --no-prompt --extcmd=cat --rotate-to=\"2\" HEAD^ >output&&\n+\tgit difftool --no-prompt --extcmd=cat --rotate-to=\"2\" HEAD^ >output &&\n \tcat >expect <<-\\EOF &&\n \t2\n \t4\n-- \n2.31.1\n\n"},{"id":"426605","messageId":"56915c33-10b8-2ecb-6862-6d56d791dff9@gmail.com","threadId":"55868","inReplyTo":"20210607131320.982362-1-rybak.a.v@gmail.com","subject":"Re: [PATCH] t: fix whitespace around &&","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2021-06-07T14:10:37Z","receivedAt":"2021-06-07T14:11:42Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 6/7/2021 9:13 AM, Andrei Rybak wrote:\n> Add missing spaces before '&&' and switch tabs around '&&' to spaces.\n> \n> These issues were found using `git grep '[^ ]&&$'` and\n> `git grep -P '&&\\t'`.\n\nThanks for this mostly-obvious cleanup, especially for fixing the\nmistakes I made.\n\n> -\t\tset ${files} &&\tfile=$1 && shift && files=\"$*\" &&\n> +\t\tset ${files} && file=$1 && shift && files=\"$*\" &&\n\nThis is the one that is not obvious, but it is because of\nan instance of \"&&\\t\" in the middle of the line. Thanks for\ncatching it!\n\n-Stolee\n"},{"id":"426646","messageId":"xmqq8s3lv7dm.fsf@gitster.g","threadId":"55868","inReplyTo":"20210607131320.982362-1-rybak.a.v@gmail.com","subject":"Re: [PATCH] t: fix whitespace around &&","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-06-07T18:48:05Z","receivedAt":"2021-06-07T18:48:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andrei Rybak <rybak.a.v@gmail.com> writes:\n\n> Add missing spaces before '&&' and switch tabs around '&&' to spaces.\n>\n> These issues were found using `git grep '[^ ]&&$'` and\n> `git grep -P '&&\\t'`.\n>\n> Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com>\n> ---\n>  contrib/mw-to-git/t/t9360-mw-to-git-clone.sh | 2 +-\n>  contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh  | 4 ++--\n>  t/t1092-sparse-checkout-compatibility.sh     | 2 +-\n>  t/t3920-crlf-messages.sh                     | 2 +-\n>  t/t4203-mailmap.sh                           | 2 +-\n>  t/t4205-log-pretty-formats.sh                | 2 +-\n>  t/t7800-difftool.sh                          | 2 +-\n>  7 files changed, 8 insertions(+), 8 deletions(-)\n\nLooks trivially correct, all of them.  Thanks.\n\n> diff --git a/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh b/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh\n> index 4c39bda7bf..f08890d9e7 100755\n> --- a/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh\n> +++ b/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh\n> @@ -86,7 +86,7 @@ test_expect_success 'Git clone works with page added' '\n>  test_expect_success 'Git clone works with an edited page ' '\n>  \twiki_reset &&\n>  \twiki_editpage foo \"this page will be edited\" \\\n> -\t\tfalse -s \"first edition of page foo\"&&\n> +\t\tfalse -s \"first edition of page foo\" &&\n>  \twiki_editpage foo \"this page has been edited and must be on the clone \" true &&\n>  \tgit clone mediawiki::'\"$WIKI_URL\"' mw_dir_6 &&\n>  \ttest_path_is_file mw_dir_6/Foo.mw &&\n> diff --git a/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh b/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh\n> index 6b0dbdac4d..526d92850f 100755\n> --- a/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh\n> +++ b/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh\n> @@ -287,7 +287,7 @@ test_expect_success 'git push with \\' '\n>  \t\tgit add \\\\ko\\\\o.mw &&\n>  \t\tgit commit -m \" \\\\ko\\\\o added\" &&\n>  \t\tgit push\n> -\t)&&\n> +\t) &&\n>  \twiki_page_exist \\\\ko\\\\o &&\n>  \twiki_check_content mw_dir_18/\\\\ko\\\\o.mw \\\\ko\\\\o\n>  \n> @@ -311,7 +311,7 @@ test_expect_success 'git push with \\ in format control' '\n>  \t\tgit add \\\\fo\\\\o.mw &&\n>  \t\tgit commit -m \" \\\\fo\\\\o added\" &&\n>  \t\tgit push\n> -\t)&&\n> +\t) &&\n>  \twiki_page_exist \\\\fo\\\\o &&\n>  \twiki_check_content mw_dir_20/\\\\fo\\\\o.mw \\\\fo\\\\o\n>  \n> diff --git a/t/t1092-sparse-checkout-compatibility.sh b/t/t1092-sparse-checkout-compatibility.sh\n> index e9a815ca7a..d028b73eba 100755\n> --- a/t/t1092-sparse-checkout-compatibility.sh\n> +++ b/t/t1092-sparse-checkout-compatibility.sh\n> @@ -268,7 +268,7 @@ test_expect_success 'diff with renames' '\n>  \tfor branch in rename-out-to-out rename-out-to-in rename-in-to-out\n>  \tdo\n>  \t\ttest_all_match git checkout rename-base &&\n> -\t\ttest_all_match git checkout $branch -- .&&\n> +\t\ttest_all_match git checkout $branch -- . &&\n>  \t\ttest_all_match git diff --staged --no-renames &&\n>  \t\ttest_all_match git diff --staged --find-renames || return 1\n>  \tdone\n> diff --git a/t/t3920-crlf-messages.sh b/t/t3920-crlf-messages.sh\n> index 70ddce3a2e..a8ad5462d9 100755\n> --- a/t/t3920-crlf-messages.sh\n> +++ b/t/t3920-crlf-messages.sh\n> @@ -64,7 +64,7 @@ test_crlf_subject_body_and_contents() {\n>  \twhile test -n \"${atoms}\"\n>  \tdo\n>  \t\tset ${atoms} && atom=$1 && shift && atoms=\"$*\" &&\n> -\t\tset ${files} &&\tfile=$1 && shift && files=\"$*\" &&\n> +\t\tset ${files} && file=$1 && shift && files=\"$*\" &&\n>  \t\ttest_expect_success \"${command}: --format='%${atom}' works with messages using CRLF\" \"\n>  \t\t\trm -f expect &&\n>  \t\t\tfor ref in ${LIB_CRLF_BRANCHES}\n> diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh\n> index d8e7374234..0b2d21ec55 100755\n> --- a/t/t4203-mailmap.sh\n> +++ b/t/t4203-mailmap.sh\n> @@ -959,7 +959,7 @@ test_expect_success SYMLINKS 'symlinks not respected in-tree' '\n>  \ttest_when_finished \"rm .mailmap\" &&\n>  \tln -s map .mailmap &&\n>  \tgit log -1 --format=%aE >actual &&\n> -\techo \"orig@example.com\" >expect&&\n> +\techo \"orig@example.com\" >expect &&\n>  \ttest_cmp expect actual\n>  '\n>  \n> diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh\n> index 8272d94ce6..5865daa8f8 100755\n> --- a/t/t4205-log-pretty-formats.sh\n> +++ b/t/t4205-log-pretty-formats.sh\n> @@ -988,7 +988,7 @@ test_expect_success '%(describe) vs git describe' '\n>  \n>  test_expect_success '%(describe:match=...) vs git describe --match ...' '\n>  \ttest_when_finished \"git tag -d tag-match\" &&\n> -\tgit tag -a -m tagged tag-match&&\n> +\tgit tag -a -m tagged tag-match &&\n>  \tgit describe --match \"*-match\" >expect &&\n>  \tgit log -1 --format=\"%(describe:match=*-match)\" >actual &&\n>  \ttest_cmp expect actual\n> diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh\n> index 3e041e83ae..a173f564bc 100755\n> --- a/t/t7800-difftool.sh\n> +++ b/t/t7800-difftool.sh\n> @@ -770,7 +770,7 @@ test_expect_success 'difftool --rotate-to' '\n>  \techo 4 >4 &&\n>  \tgit add 1 2 4 &&\n>  \tgit commit -a -m \"124\" &&\n> -\tgit difftool --no-prompt --extcmd=cat --rotate-to=\"2\" HEAD^ >output&&\n> +\tgit difftool --no-prompt --extcmd=cat --rotate-to=\"2\" HEAD^ >output &&\n>  \tcat >expect <<-\\EOF &&\n>  \t2\n>  \t4\n"}]}