{"thread":{"id":"52999","subject":"[PATCH] t: fix whitespace around &&","startedAt":"2020-03-15T18:09:34Z","lastAt":"2020-03-22T23:45:43Z","messageCount":7,"participants":["Andrei Rybak","Eric Sunshine","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"393275","messageId":"20200315180902.13750-1-rybak.a.v@gmail.com","threadId":"52999","inReplyTo":null,"subject":"[PATCH] t: fix whitespace around &&","fromName":"Andrei Rybak","fromEmail":"rybak.a.v@gmail.com","sentAt":"2020-03-15T18:09:03Z","receivedAt":"2020-03-15T18:09:34Z","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 to spaces.  Also fix the\nspace after redirection operator in t3701-add-interactive.sh while we're\nhere.  These issues were found using `git grep '[^ ]&&$'`.\n\nSigned-off-by: Andrei Rybak <rybak.a.v@gmail.com>\n---\n t/t2402-worktree-list.sh               | 2 +-\n t/t3417-rebase-whitespace-fix.sh       | 2 +-\n t/t3700-add.sh                         | 2 +-\n t/t3701-add-interactive.sh             | 2 +-\n t/t4057-diff-combined-paths.sh         | 2 +-\n t/t4150-am.sh                          | 2 +-\n t/t5537-fetch-shallow.sh               | 2 +-\n t/t7400-submodule-basic.sh             | 4 ++--\n t/t7609-merge-co-error-msgs.sh         | 2 +-\n t/t9010-svn-fe.sh                      | 2 +-\n t/t9500-gitweb-standalone-no-errors.sh | 4 ++--\n t/t9831-git-p4-triggers.sh             | 2 +-\n 12 files changed, 14 insertions(+), 14 deletions(-)\n\ndiff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh\nindex 69ffe865b4..52585ec2aa 100755\n--- a/t/t2402-worktree-list.sh\n+++ b/t/t2402-worktree-list.sh\n@@ -152,7 +152,7 @@ test_expect_success 'linked worktrees are sorted' '\n '\n \n test_expect_success 'worktree path when called in .git directory' '\n-\tgit worktree list >list1&&\n+\tgit worktree list >list1 &&\n \tgit -C .git worktree list >list2 &&\n \ttest_cmp list1 list2\n '\ndiff --git a/t/t3417-rebase-whitespace-fix.sh b/t/t3417-rebase-whitespace-fix.sh\nindex e85cdc7037..14df183fa5 100755\n--- a/t/t3417-rebase-whitespace-fix.sh\n+++ b/t/t3417-rebase-whitespace-fix.sh\n@@ -118,7 +118,7 @@ test_expect_success 'at beginning of file' '\n \tfor i in 1 2 3 4 5; do\n \t\techo $i\n \tdone >> file &&\n-\tgit commit -m more file\t&&\n+\tgit commit -m more file &&\n \tgit rebase --whitespace=fix HEAD^^ &&\n \ttest_cmp expect-beginning file\n '\ndiff --git a/t/t3700-add.sh b/t/t3700-add.sh\nindex 88bc799807..b7d4ba608c 100755\n--- a/t/t3700-add.sh\n+++ b/t/t3700-add.sh\n@@ -192,7 +192,7 @@ test_expect_success 'git add --refresh with pathspec' '\n \ttest_must_be_empty actual &&\n \n \tgit diff-files --name-only >actual &&\n-\t! grep bar actual&&\n+\t! grep bar actual &&\n \tgrep baz actual\n '\n \ndiff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh\nindex 5bae6e50f1..b3d8bb7577 100755\n--- a/t/t3701-add-interactive.sh\n+++ b/t/t3701-add-interactive.sh\n@@ -780,7 +780,7 @@ test_expect_success 'add -p patch editing works with pathological context lines'\n test_expect_success 'checkout -p works with pathological context lines' '\n \ttest_write_lines a a a a a a >a &&\n \tgit add a &&\n-\ttest_write_lines a b a b a b a b a b a > a&&\n+\ttest_write_lines a b a b a b a b a b a >a &&\n \ttest_write_lines s n n y q | git checkout -p &&\n \ttest_write_lines a b a b a a b a b a >expect &&\n \ttest_cmp expect a\ndiff --git a/t/t4057-diff-combined-paths.sh b/t/t4057-diff-combined-paths.sh\nindex 4f4b541658..0b78573733 100755\n--- a/t/t4057-diff-combined-paths.sh\n+++ b/t/t4057-diff-combined-paths.sh\n@@ -14,7 +14,7 @@ diffc_verify () {\n test_expect_success 'trivial merge - combine-diff empty' '\n \tfor i in $(test_seq 1 9)\n \tdo\n-\t\techo $i >$i.txt\t&&\n+\t\techo $i >$i.txt &&\n \t\tgit add $i.txt\n \tdone &&\n \tgit commit -m \"init\" &&\ndiff --git a/t/t4150-am.sh b/t/t4150-am.sh\nindex cb45271457..bda4586a79 100755\n--- a/t/t4150-am.sh\n+++ b/t/t4150-am.sh\n@@ -166,7 +166,7 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m third &&\n \n-\tgit format-patch --stdout first >patch2\t&&\n+\tgit format-patch --stdout first >patch2 &&\n \n \tgit checkout -b lorem &&\n \tsed -n -e \"11,\\$p\" msg >file &&\ndiff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh\nindex 4f681dbbe1..b57209c84f 100755\n--- a/t/t5537-fetch-shallow.sh\n+++ b/t/t5537-fetch-shallow.sh\n@@ -131,7 +131,7 @@ test_expect_success 'fetch that requires changes in .git/shallow is filtered' '\n \tgit init notshallow &&\n \t(\n \tcd notshallow &&\n-\tgit fetch ../shallow/.git refs/heads/*:refs/remotes/shallow/*&&\n+\tgit fetch ../shallow/.git refs/heads/*:refs/remotes/shallow/* &&\n \tgit for-each-ref --format=\"%(refname)\" >actual.refs &&\n \tcat <<EOF >expect.refs &&\n refs/remotes/shallow/no-shallow\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex e3e2aab3b0..956e17abb3 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -938,7 +938,7 @@ test_expect_success 'submodule add --name allows to replace a submodule with ano\n \t\techo \"repo\" >expect &&\n \t\ttest_must_fail git config -f .gitmodules submodule.repo.path &&\n \t\tgit config -f .gitmodules submodule.repo_new.path >actual &&\n-\t\ttest_cmp expect actual&&\n+\t\ttest_cmp expect actual &&\n \t\techo \"$submodurl/repo\" >expect &&\n \t\ttest_must_fail git config -f .gitmodules submodule.repo.url &&\n \t\techo \"$submodurl/bare.git\" >expect &&\n@@ -1010,7 +1010,7 @@ test_expect_success 'submodule add with an existing name fails unless forced' '\n \t\ttest -d repo &&\n \t\techo \"repo\" >expect &&\n \t\tgit config -f .gitmodules submodule.repo_new.path >actual &&\n-\t\ttest_cmp expect actual&&\n+\t\ttest_cmp expect actual &&\n \t\techo \"$submodurl/repo.git\" >expect &&\n \t\tgit config -f .gitmodules submodule.repo_new.url >actual &&\n \t\ttest_cmp expect actual &&\ndiff --git a/t/t7609-merge-co-error-msgs.sh b/t/t7609-merge-co-error-msgs.sh\nindex e90413204e..5c8894d94f 100755\n--- a/t/t7609-merge-co-error-msgs.sh\n+++ b/t/t7609-merge-co-error-msgs.sh\n@@ -126,7 +126,7 @@ test_expect_success 'not_uptodate_dir porcelain checkout error' '\n \tgit rm rep2 -r &&\n \t>rep &&\n \t>rep2 &&\n-\tgit add rep rep2&&\n+\tgit add rep rep2 &&\n \tgit commit -m \"added test as a file\" &&\n \tgit checkout master &&\n \t>rep/untracked-file &&\ndiff --git a/t/t9010-svn-fe.sh b/t/t9010-svn-fe.sh\nindex c90fdc5c89..83f8f5cacb 100755\n--- a/t/t9010-svn-fe.sh\n+++ b/t/t9010-svn-fe.sh\n@@ -486,7 +486,7 @@ test_expect_success 'NUL in property value' '\n \t{\n \t\tproperties \\\n \t\t\tunimportant \"something with a NUL (Q)\" \\\n-\t\t\tsvn:log \"commit message\"&&\n+\t\t\tsvn:log \"commit message\" &&\n \t\techo PROPS-END\n \t} |\n \tq_to_nul >props &&\ndiff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\nindex cc8d463e01..a3cbf20ae7 100755\n--- a/t/t9500-gitweb-standalone-no-errors.sh\n+++ b/t/t9500-gitweb-standalone-no-errors.sh\n@@ -348,7 +348,7 @@ test_expect_success \\\n \t echo \"To be renamed and changed\" > 04-rename-from &&\n \t echo \"To have mode changed\" > 05-mode-change &&\n \t echo \"File to symlink\" > 06-file-or-symlink &&\n-\t echo \"To be changed and have mode changed\" > 07-change-mode-change\t&&\n+\t echo \"To be changed and have mode changed\" > 07-change-mode-change &&\n \t git add 0* &&\n \t git commit -a -m \"Prepare large commit\" &&\n \t echo \"Changed\" > 01-change &&\n@@ -361,7 +361,7 @@ test_expect_success \\\n \t test_chmod +x 05-mode-change &&\n \t rm -f 06-file-or-symlink &&\n \t test_ln_s_add 01-change 06-file-or-symlink &&\n-\t echo \"Changed and have mode changed\" > 07-change-mode-change\t&&\n+\t echo \"Changed and have mode changed\" > 07-change-mode-change &&\n \t test_chmod +x 07-change-mode-change &&\n \t git commit -a -m \"Large commit\" &&\n \t git checkout master'\ndiff --git a/t/t9831-git-p4-triggers.sh b/t/t9831-git-p4-triggers.sh\nindex d743ca33ee..ff6c0352e6 100755\n--- a/t/t9831-git-p4-triggers.sh\n+++ b/t/t9831-git-p4-triggers.sh\n@@ -58,7 +58,7 @@ test_expect_success 'import with extra info lines from verbose p4 trigger' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit p4 sync\n-\t)&&\n+\t) &&\n \t(\n \t\tp4 triggers -i <<-EOF\n \t\tTriggers:\n-- \n2.25.1\n\n"},{"id":"393277","messageId":"CAPig+cTGqEdr+rjRCfKmcm=ab3vKnUokd6KyrsoBiy=AO9nnOQ@mail.gmail.com","threadId":"52999","inReplyTo":"20200315180902.13750-1-rybak.a.v@gmail.com","subject":"Re: [PATCH] t: fix whitespace around &&","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2020-03-15T18:20:28Z","receivedAt":"2020-03-15T18:20:42Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sun, Mar 15, 2020 at 2:09 PM Andrei Rybak <rybak.a.v@gmail.com> wrote:\n> Add missing spaces before '&&' and switch tabs to spaces.  Also fix the\n> space after redirection operator in t3701-add-interactive.sh while we're\n> here.  These issues were found using `git grep '[^ ]&&$'`.\n>\n> Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com>\n> ---\n> diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\n> @@ -348,7 +348,7 @@ test_expect_success \\\n> -        echo \"To be changed and have mode changed\" > 07-change-mode-change     &&\n> +        echo \"To be changed and have mode changed\" > 07-change-mode-change &&\n\nThe commit message talks about dropping whitespace after the '>'\nredirection operator (and some of the changes in this patch do so),\nhowever, this change neglects that cleanup.\n\n> @@ -361,7 +361,7 @@ test_expect_success \\\n> -        echo \"Changed and have mode changed\" > 07-change-mode-change   &&\n> +        echo \"Changed and have mode changed\" > 07-change-mode-change &&\n\nDitto.\n"},{"id":"393278","messageId":"0ad0600c-d1fc-0f44-dae1-7bd0fc22b3e8@gmail.com","threadId":"52999","inReplyTo":"CAPig+cTGqEdr+rjRCfKmcm=ab3vKnUokd6KyrsoBiy=AO9nnOQ@mail.gmail.com","subject":"Re: [PATCH] t: fix whitespace around &&","fromName":"Andrei Rybak","fromEmail":"rybak.a.v@gmail.com","sentAt":"2020-03-15T18:35:39Z","receivedAt":"2020-03-15T18:35:46Z","isPatch":true,"sender":{"key":"rybak.a.v@gmail.com","avatar":"https://avatars.githubusercontent.com/u/624072?v=4"},"body":"On 2020-03-15 19:20, Eric Sunshine wrote:\n> On Sun, Mar 15, 2020 at 2:09 PM Andrei Rybak <rybak.a.v@gmail.com> wrote:\n>> Add missing spaces before '&&' and switch tabs to spaces.  Also fix the\n>> space after redirection operator in t3701-add-interactive.sh while we're\n>> here.  These issues were found using `git grep '[^ ]&&$'`.\n>>\n>> Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com>\n>> ---\n>> diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\n>> @@ -348,7 +348,7 @@ test_expect_success \\\n>> -        echo \"To be changed and have mode changed\" > 07-change-mode-change     &&\n>> +        echo \"To be changed and have mode changed\" > 07-change-mode-change &&\n> \n> The commit message talks about dropping whitespace after the '>'\n> redirection operator (and some of the changes in this patch do so),\n> however, this change neglects that cleanup.\n\nGood catch. t9500-gitweb-standalone-no-errors.sh has 35 of these vs 19\nredirects with correct formatting, so it might be better to fix those redirects\nin a separate patch. What do you think?\n\n>> @@ -361,7 +361,7 @@ test_expect_success \\\n>> -        echo \"Changed and have mode changed\" > 07-change-mode-change   &&\n>> +        echo \"Changed and have mode changed\" > 07-change-mode-change &&\n> \n> Ditto.\n> \n\nThanks for review.\n"},{"id":"393279","messageId":"CAPig+cSE-c8ax8MyPg3QsDhgvRWt1HGRkV3x6WXJWEUbJQ_yJA@mail.gmail.com","threadId":"52999","inReplyTo":"0ad0600c-d1fc-0f44-dae1-7bd0fc22b3e8@gmail.com","subject":"Re: [PATCH] t: fix whitespace around &&","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2020-03-15T18:38:24Z","receivedAt":"2020-03-15T18:38:38Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sun, Mar 15, 2020 at 2:35 PM Andrei Rybak <rybak.a.v@gmail.com> wrote:\n> On 2020-03-15 19:20, Eric Sunshine wrote:\n> > On Sun, Mar 15, 2020 at 2:09 PM Andrei Rybak <rybak.a.v@gmail.com> wrote:\n> >> -        echo \"To be changed and have mode changed\" > 07-change-mode-change     &&\n> >> +        echo \"To be changed and have mode changed\" > 07-change-mode-change &&\n> >\n> > The commit message talks about dropping whitespace after the '>'\n> > redirection operator (and some of the changes in this patch do so),\n> > however, this change neglects that cleanup.\n>\n> Good catch. t9500-gitweb-standalone-no-errors.sh has 35 of these vs 19\n> redirects with correct formatting, so it might be better to fix those redirects\n> in a separate patch. What do you think?\n\nYes, fixing it in a separate patch makes sense.\n"},{"id":"393740","messageId":"20200322211422.15129-1-rybak.a.v@gmail.com","threadId":"52999","inReplyTo":"20200315180902.13750-1-rybak.a.v@gmail.com","subject":"[PATCH v2 1/2] t9500: remove spaces after redirect operators","fromName":"Andrei Rybak","fromEmail":"rybak.a.v@gmail.com","sentAt":"2020-03-22T21:14:21Z","receivedAt":"2020-03-22T21:14:34Z","isPatch":true,"sender":{"key":"rybak.a.v@gmail.com","avatar":"https://avatars.githubusercontent.com/u/624072?v=4"},"body":"For shell scripts, the usual convention is for there to be no space\nafter redirection operators, (e.g. `>file`, not `> file`). Remove these\nspaces wherever they appear.\n\nSigned-off-by: Andrei Rybak <rybak.a.v@gmail.com>\n---\n\nA new patch from review by Eric Sunshine.\n\n t/t9500-gitweb-standalone-no-errors.sh | 70 +++++++++++++-------------\n 1 file changed, 35 insertions(+), 35 deletions(-)\n\ndiff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\nindex cc8d463e01..784df80858 100755\n--- a/t/t9500-gitweb-standalone-no-errors.sh\n+++ b/t/t9500-gitweb-standalone-no-errors.sh\n@@ -53,7 +53,7 @@ test_expect_success \\\n \n test_expect_success \\\n \t'Make initial commit' \\\n-\t'echo \"Not an empty file.\" > file &&\n+\t'echo \"Not an empty file.\" >file &&\n \t git add file &&\n \t git commit -a -m \"Initial commit.\" &&\n \t git branch b'\n@@ -139,7 +139,7 @@ test_expect_success \\\n \n test_expect_success \\\n \t'commitdiff(0): file added' \\\n-\t'echo \"New file\" > new_file &&\n+\t'echo \"New file\" >new_file &&\n \t git add new_file &&\n \t git commit -a -m \"File added.\" &&\n \t gitweb_run \"p=.git;a=commitdiff\"'\n@@ -179,7 +179,7 @@ test_expect_success \\\n \n test_expect_success \\\n \t'commitdiff(0): mode change and modified' \\\n-\t'echo \"New line\" >> file2 &&\n+\t'echo \"New line\" >>file2 &&\n \t test_chmod +x file2 &&\n \t git commit -a -m \"Mode change and modification.\" &&\n \t gitweb_run \"p=.git;a=commitdiff\"'\n@@ -197,14 +197,14 @@ propter nomen suum.\n EOF\n \t git commit -a -m \"File added.\" &&\n \t git mv file2 file3 &&\n-\t echo \"Propter nomen suum.\" >> file3 &&\n+\t echo \"Propter nomen suum.\" >>file3 &&\n \t git commit -a -m \"File rename and modification.\" &&\n \t gitweb_run \"p=.git;a=commitdiff\"'\n \n test_expect_success \\\n \t'commitdiff(0): renamed, mode change and modified' \\\n \t'git mv file3 file2 &&\n-\t echo \"Propter nomen suum.\" >> file2 &&\n+\t echo \"Propter nomen suum.\" >>file2 &&\n \t test_chmod +x file2 &&\n \t git commit -a -m \"File rename, mode change and modification.\" &&\n \t gitweb_run \"p=.git;a=commitdiff\"'\n@@ -213,8 +213,8 @@ test_expect_success \\\n # commitdiff testing (taken from t4114-apply-typechange.sh)\n \n test_expect_success 'setup typechange commits' '\n-\techo \"hello world\" > foo &&\n-\techo \"hi planet\" > bar &&\n+\techo \"hello world\" >foo &&\n+\techo \"hi planet\" >bar &&\n \tgit update-index --add foo bar &&\n \tgit commit -m initial &&\n \tgit branch initial &&\n@@ -223,18 +223,18 @@ test_expect_success 'setup typechange commits' '\n \tgit commit -m \"foo symlinked to bar\" &&\n \tgit branch foo-symlinked-to-bar &&\n \trm -f foo &&\n-\techo \"how far is the sun?\" > foo &&\n+\techo \"how far is the sun?\" >foo &&\n \tgit update-index foo &&\n \tgit commit -m \"foo back to file\" &&\n \tgit branch foo-back-to-file &&\n \trm -f foo &&\n \tgit update-index --remove foo &&\n \tmkdir foo &&\n-\techo \"if only I knew\" > foo/baz &&\n+\techo \"if only I knew\" >foo/baz &&\n \tgit update-index --add foo/baz &&\n \tgit commit -m \"foo becomes a directory\" &&\n \tgit branch \"foo-becomes-a-directory\" &&\n-\techo \"hello world\" > foo/baz &&\n+\techo \"hello world\" >foo/baz &&\n \tgit update-index foo/baz &&\n \tgit commit -m \"foo/baz is the original foo\" &&\n \tgit branch foo-baz-renamed-from-foo\n@@ -324,7 +324,7 @@ test_expect_success 'commitdiff(1): removal of incomplete line' '\n test_expect_success \\\n \t'Create a merge' \\\n \t'git checkout b &&\n-\t echo \"Branch\" >> b &&\n+\t echo \"Branch\" >>b &&\n \t git add b &&\n \t git commit -a -m \"On branch\" &&\n \t git checkout master &&\n@@ -342,26 +342,26 @@ test_expect_success \\\n test_expect_success \\\n \t'Prepare large commit' \\\n \t'git checkout b &&\n-\t echo \"To be changed\" > 01-change &&\n-\t echo \"To be renamed\" > 02-pure-rename-from &&\n-\t echo \"To be deleted\" > 03-delete &&\n-\t echo \"To be renamed and changed\" > 04-rename-from &&\n-\t echo \"To have mode changed\" > 05-mode-change &&\n-\t echo \"File to symlink\" > 06-file-or-symlink &&\n-\t echo \"To be changed and have mode changed\" > 07-change-mode-change\t&&\n+\t echo \"To be changed\" >01-change &&\n+\t echo \"To be renamed\" >02-pure-rename-from &&\n+\t echo \"To be deleted\" >03-delete &&\n+\t echo \"To be renamed and changed\" >04-rename-from &&\n+\t echo \"To have mode changed\" >05-mode-change &&\n+\t echo \"File to symlink\" >06-file-or-symlink &&\n+\t echo \"To be changed and have mode changed\" >07-change-mode-change\t&&\n \t git add 0* &&\n \t git commit -a -m \"Prepare large commit\" &&\n-\t echo \"Changed\" > 01-change &&\n+\t echo \"Changed\" >01-change &&\n \t git mv 02-pure-rename-from 02-pure-rename-to &&\n \t git rm 03-delete && rm -f 03-delete &&\n-\t echo \"A new file\" > 03-new &&\n+\t echo \"A new file\" >03-new &&\n \t git add 03-new &&\n \t git mv 04-rename-from 04-rename-to &&\n-\t echo \"Changed\" >> 04-rename-to &&\n+\t echo \"Changed\" >>04-rename-to &&\n \t test_chmod +x 05-mode-change &&\n \t rm -f 06-file-or-symlink &&\n \t test_ln_s_add 01-change 06-file-or-symlink &&\n-\t echo \"Changed and have mode changed\" > 07-change-mode-change\t&&\n+\t echo \"Changed and have mode changed\" >07-change-mode-change\t&&\n \t test_chmod +x 07-change-mode-change &&\n \t git commit -a -m \"Large commit\" &&\n \t git checkout master'\n@@ -444,7 +444,7 @@ test_expect_success \\\n test_expect_success \\\n \t'logs: history (implicit HEAD, deleted file)' \\\n \t'git checkout master &&\n-\t echo \"to be deleted\" > deleted_file &&\n+\t echo \"to be deleted\" >deleted_file &&\n \t git add deleted_file &&\n \t git commit -m \"Add file to be deleted\" &&\n \t git rm deleted_file &&\n@@ -522,7 +522,7 @@ test_expect_success \\\n \t'. \"$TEST_DIRECTORY\"/t3901/utf8.txt &&\n \t test_when_finished \"GIT_AUTHOR_NAME=\\\"A U Thor\\\"\" &&\n \t test_when_finished \"GIT_COMMITTER_NAME=\\\"C O Mitter\\\"\" &&\n-\t echo \"UTF-8\" >> file &&\n+\t echo \"UTF-8\" >>file &&\n \t git add file &&\n \t git commit -F \"$TEST_DIRECTORY\"/t3900/1-UTF-8.txt &&\n \t gitweb_run \"p=.git;a=commit\"'\n@@ -532,7 +532,7 @@ test_expect_success \\\n \t'. \"$TEST_DIRECTORY\"/t3901/8859-1.txt &&\n \t test_when_finished \"GIT_AUTHOR_NAME=\\\"A U Thor\\\"\" &&\n \t test_when_finished \"GIT_COMMITTER_NAME=\\\"C O Mitter\\\"\" &&\n-\t echo \"ISO-8859-1\" >> file &&\n+\t echo \"ISO-8859-1\" >>file &&\n \t git add file &&\n \t test_config i18n.commitencoding ISO-8859-1 &&\n \t git commit -F \"$TEST_DIRECTORY\"/t3900/ISO8859-1.txt &&\n@@ -675,8 +675,8 @@ test_expect_success \\\n \n test_expect_success \\\n \t'README.html with non-ASCII characters (utf-8)' \\\n-\t'echo \"<b>UTF-8 example:</b><br />\" > .git/README.html &&\n-\t cat \"$TEST_DIRECTORY\"/t3900/1-UTF-8.txt >> .git/README.html &&\n+\t'echo \"<b>UTF-8 example:</b><br />\" >.git/README.html &&\n+\t cat \"$TEST_DIRECTORY\"/t3900/1-UTF-8.txt >>.git/README.html &&\n \t gitweb_run \"p=.git;a=summary\"'\n \n # ----------------------------------------------------------------------\n@@ -704,7 +704,7 @@ test_expect_success HIGHLIGHT \\\n test_expect_success HIGHLIGHT \\\n \t'syntax highlighting (highlighted, shell script)' \\\n \t'git config gitweb.highlight yes &&\n-\t echo \"#!/usr/bin/sh\" > test.sh &&\n+\t echo \"#!/usr/bin/sh\" >test.sh &&\n \t git add test.sh &&\n \t git commit -m \"Add test.sh\" &&\n \t gitweb_run \"p=.git;a=blob;f=test.sh\"'\n@@ -712,7 +712,7 @@ test_expect_success HIGHLIGHT \\\n test_expect_success HIGHLIGHT \\\n \t'syntax highlighting (highlighter language autodetection)' \\\n \t'git config gitweb.highlight yes &&\n-\t echo \"#!/usr/bin/perl\" > test &&\n+\t echo \"#!/usr/bin/perl\" >test &&\n \t git add test &&\n \t git commit -m \"Add test\" &&\n \t gitweb_run \"p=.git;a=blob;f=test\"'\n@@ -729,11 +729,11 @@ test_expect_success \\\n \t'git init --bare foo.git &&\n \t git --git-dir=foo.git --work-tree=. add file &&\n \t git --git-dir=foo.git --work-tree=. commit -m \"Initial commit\" &&\n-\t echo \"foo\" > foo.git/description &&\n+\t echo \"foo\" >foo.git/description &&\n \t mkdir -p foo &&\n \t (cd foo &&\n \t  git clone --shared --bare ../foo.git foo-forked.git &&\n-\t  echo \"fork of foo\" > foo-forked.git/description)'\n+\t  echo \"fork of foo\" >foo-forked.git/description)'\n \n test_expect_success \\\n \t'forks: projects list' \\\n@@ -754,8 +754,8 @@ EOF\n test_expect_success \\\n \t'ctags: tag cloud in projects list' \\\n \t'mkdir .git/ctags &&\n-\t echo \"2\" > .git/ctags/foo &&\n-\t echo \"1\" > .git/ctags/bar &&\n+\t echo \"2\" >.git/ctags/foo &&\n+\t echo \"1\" >.git/ctags/bar &&\n \tgitweb_run'\n \n test_expect_success \\\n@@ -769,8 +769,8 @@ test_expect_success \\\n test_expect_success \\\n \t'ctags: malformed tag weights' \\\n \t'mkdir -p .git/ctags &&\n-\t echo \"not-a-number\" > .git/ctags/nan &&\n-\t echo \"not-a-number-2\" > .git/ctags/nan2 &&\n+\t echo \"not-a-number\" >.git/ctags/nan &&\n+\t echo \"not-a-number-2\" >.git/ctags/nan2 &&\n \t echo \"0.1\" >.git/ctags/floating-point &&\n \t gitweb_run'\n \n-- \n2.25.1\n\n"},{"id":"393741","messageId":"20200322211422.15129-2-rybak.a.v@gmail.com","threadId":"52999","inReplyTo":"20200322211422.15129-1-rybak.a.v@gmail.com","subject":"[PATCH v2 2/2] t: fix whitespace around &&","fromName":"Andrei Rybak","fromEmail":"rybak.a.v@gmail.com","sentAt":"2020-03-22T21:14:22Z","receivedAt":"2020-03-22T21:14:37Z","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.\nAlso fix the space after redirection operator in t3701 while we're here.\n\nThese issues were found using `git grep '[^ ]&&$'` and\n`git grep -P '&&\\t' t/`.\n\nSigned-off-by: Andrei Rybak <rybak.a.v@gmail.com>\n---\n\nChanges since v1:\n  Added two more fixes for tabs after &&, updated commit message\n  correspondingly.  One new fix is in t3417-rebase-whitespace-fix.sh and\n  another in t5604-clone-reference.sh.\n\n t/t2402-worktree-list.sh               | 2 +-\n t/t3417-rebase-whitespace-fix.sh       | 4 ++--\n t/t3700-add.sh                         | 2 +-\n t/t3701-add-interactive.sh             | 2 +-\n t/t4057-diff-combined-paths.sh         | 2 +-\n t/t4150-am.sh                          | 2 +-\n t/t5537-fetch-shallow.sh               | 2 +-\n t/t5604-clone-reference.sh             | 2 +-\n t/t7400-submodule-basic.sh             | 4 ++--\n t/t7609-merge-co-error-msgs.sh         | 2 +-\n t/t9010-svn-fe.sh                      | 2 +-\n t/t9500-gitweb-standalone-no-errors.sh | 4 ++--\n t/t9831-git-p4-triggers.sh             | 2 +-\n 13 files changed, 16 insertions(+), 16 deletions(-)\n\ndiff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh\nindex 69ffe865b4..52585ec2aa 100755\n--- a/t/t2402-worktree-list.sh\n+++ b/t/t2402-worktree-list.sh\n@@ -152,7 +152,7 @@ test_expect_success 'linked worktrees are sorted' '\n '\n \n test_expect_success 'worktree path when called in .git directory' '\n-\tgit worktree list >list1&&\n+\tgit worktree list >list1 &&\n \tgit -C .git worktree list >list2 &&\n \ttest_cmp list1 list2\n '\ndiff --git a/t/t3417-rebase-whitespace-fix.sh b/t/t3417-rebase-whitespace-fix.sh\nindex e85cdc7037..946e92f8da 100755\n--- a/t/t3417-rebase-whitespace-fix.sh\n+++ b/t/t3417-rebase-whitespace-fix.sh\n@@ -52,7 +52,7 @@ test_expect_success 'blank line at end of file; extend at end of file' '\n \tgit commit --allow-empty -m \"Initial empty commit\" &&\n \tgit add file && git commit -m first &&\n \tmv second file &&\n-\tgit add file &&\tgit commit -m second &&\n+\tgit add file && git commit -m second &&\n \tgit rebase --whitespace=fix HEAD^^ &&\n \tgit diff --exit-code HEAD^:file expect-first &&\n \ttest_cmp expect-second file\n@@ -118,7 +118,7 @@ test_expect_success 'at beginning of file' '\n \tfor i in 1 2 3 4 5; do\n \t\techo $i\n \tdone >> file &&\n-\tgit commit -m more file\t&&\n+\tgit commit -m more file &&\n \tgit rebase --whitespace=fix HEAD^^ &&\n \ttest_cmp expect-beginning file\n '\ndiff --git a/t/t3700-add.sh b/t/t3700-add.sh\nindex 88bc799807..b7d4ba608c 100755\n--- a/t/t3700-add.sh\n+++ b/t/t3700-add.sh\n@@ -192,7 +192,7 @@ test_expect_success 'git add --refresh with pathspec' '\n \ttest_must_be_empty actual &&\n \n \tgit diff-files --name-only >actual &&\n-\t! grep bar actual&&\n+\t! grep bar actual &&\n \tgrep baz actual\n '\n \ndiff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh\nindex 5bae6e50f1..b3d8bb7577 100755\n--- a/t/t3701-add-interactive.sh\n+++ b/t/t3701-add-interactive.sh\n@@ -780,7 +780,7 @@ test_expect_success 'add -p patch editing works with pathological context lines'\n test_expect_success 'checkout -p works with pathological context lines' '\n \ttest_write_lines a a a a a a >a &&\n \tgit add a &&\n-\ttest_write_lines a b a b a b a b a b a > a&&\n+\ttest_write_lines a b a b a b a b a b a >a &&\n \ttest_write_lines s n n y q | git checkout -p &&\n \ttest_write_lines a b a b a a b a b a >expect &&\n \ttest_cmp expect a\ndiff --git a/t/t4057-diff-combined-paths.sh b/t/t4057-diff-combined-paths.sh\nindex 4f4b541658..0b78573733 100755\n--- a/t/t4057-diff-combined-paths.sh\n+++ b/t/t4057-diff-combined-paths.sh\n@@ -14,7 +14,7 @@ diffc_verify () {\n test_expect_success 'trivial merge - combine-diff empty' '\n \tfor i in $(test_seq 1 9)\n \tdo\n-\t\techo $i >$i.txt\t&&\n+\t\techo $i >$i.txt &&\n \t\tgit add $i.txt\n \tdone &&\n \tgit commit -m \"init\" &&\ndiff --git a/t/t4150-am.sh b/t/t4150-am.sh\nindex cb45271457..bda4586a79 100755\n--- a/t/t4150-am.sh\n+++ b/t/t4150-am.sh\n@@ -166,7 +166,7 @@ test_expect_success setup '\n \ttest_tick &&\n \tgit commit -m third &&\n \n-\tgit format-patch --stdout first >patch2\t&&\n+\tgit format-patch --stdout first >patch2 &&\n \n \tgit checkout -b lorem &&\n \tsed -n -e \"11,\\$p\" msg >file &&\ndiff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh\nindex 4f681dbbe1..b57209c84f 100755\n--- a/t/t5537-fetch-shallow.sh\n+++ b/t/t5537-fetch-shallow.sh\n@@ -131,7 +131,7 @@ test_expect_success 'fetch that requires changes in .git/shallow is filtered' '\n \tgit init notshallow &&\n \t(\n \tcd notshallow &&\n-\tgit fetch ../shallow/.git refs/heads/*:refs/remotes/shallow/*&&\n+\tgit fetch ../shallow/.git refs/heads/*:refs/remotes/shallow/* &&\n \tgit for-each-ref --format=\"%(refname)\" >actual.refs &&\n \tcat <<EOF >expect.refs &&\n refs/remotes/shallow/no-shallow\ndiff --git a/t/t5604-clone-reference.sh b/t/t5604-clone-reference.sh\nindex 0c74b4e21a..2f7be23044 100755\n--- a/t/t5604-clone-reference.sh\n+++ b/t/t5604-clone-reference.sh\n@@ -175,7 +175,7 @@ test_expect_success 'clone using repo pointed at by gitfile as reference' '\n test_expect_success 'clone and dissociate from reference' '\n \tgit init P &&\n \t(\n-\t\tcd P &&\ttest_commit one\n+\t\tcd P && test_commit one\n \t) &&\n \tgit clone P Q &&\n \t(\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex e3e2aab3b0..956e17abb3 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -938,7 +938,7 @@ test_expect_success 'submodule add --name allows to replace a submodule with ano\n \t\techo \"repo\" >expect &&\n \t\ttest_must_fail git config -f .gitmodules submodule.repo.path &&\n \t\tgit config -f .gitmodules submodule.repo_new.path >actual &&\n-\t\ttest_cmp expect actual&&\n+\t\ttest_cmp expect actual &&\n \t\techo \"$submodurl/repo\" >expect &&\n \t\ttest_must_fail git config -f .gitmodules submodule.repo.url &&\n \t\techo \"$submodurl/bare.git\" >expect &&\n@@ -1010,7 +1010,7 @@ test_expect_success 'submodule add with an existing name fails unless forced' '\n \t\ttest -d repo &&\n \t\techo \"repo\" >expect &&\n \t\tgit config -f .gitmodules submodule.repo_new.path >actual &&\n-\t\ttest_cmp expect actual&&\n+\t\ttest_cmp expect actual &&\n \t\techo \"$submodurl/repo.git\" >expect &&\n \t\tgit config -f .gitmodules submodule.repo_new.url >actual &&\n \t\ttest_cmp expect actual &&\ndiff --git a/t/t7609-merge-co-error-msgs.sh b/t/t7609-merge-co-error-msgs.sh\nindex e90413204e..5c8894d94f 100755\n--- a/t/t7609-merge-co-error-msgs.sh\n+++ b/t/t7609-merge-co-error-msgs.sh\n@@ -126,7 +126,7 @@ test_expect_success 'not_uptodate_dir porcelain checkout error' '\n \tgit rm rep2 -r &&\n \t>rep &&\n \t>rep2 &&\n-\tgit add rep rep2&&\n+\tgit add rep rep2 &&\n \tgit commit -m \"added test as a file\" &&\n \tgit checkout master &&\n \t>rep/untracked-file &&\ndiff --git a/t/t9010-svn-fe.sh b/t/t9010-svn-fe.sh\nindex c90fdc5c89..83f8f5cacb 100755\n--- a/t/t9010-svn-fe.sh\n+++ b/t/t9010-svn-fe.sh\n@@ -486,7 +486,7 @@ test_expect_success 'NUL in property value' '\n \t{\n \t\tproperties \\\n \t\t\tunimportant \"something with a NUL (Q)\" \\\n-\t\t\tsvn:log \"commit message\"&&\n+\t\t\tsvn:log \"commit message\" &&\n \t\techo PROPS-END\n \t} |\n \tq_to_nul >props &&\ndiff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\nindex 784df80858..267ddc997d 100755\n--- a/t/t9500-gitweb-standalone-no-errors.sh\n+++ b/t/t9500-gitweb-standalone-no-errors.sh\n@@ -348,7 +348,7 @@ test_expect_success \\\n \t echo \"To be renamed and changed\" >04-rename-from &&\n \t echo \"To have mode changed\" >05-mode-change &&\n \t echo \"File to symlink\" >06-file-or-symlink &&\n-\t echo \"To be changed and have mode changed\" >07-change-mode-change\t&&\n+\t echo \"To be changed and have mode changed\" >07-change-mode-change &&\n \t git add 0* &&\n \t git commit -a -m \"Prepare large commit\" &&\n \t echo \"Changed\" >01-change &&\n@@ -361,7 +361,7 @@ test_expect_success \\\n \t test_chmod +x 05-mode-change &&\n \t rm -f 06-file-or-symlink &&\n \t test_ln_s_add 01-change 06-file-or-symlink &&\n-\t echo \"Changed and have mode changed\" >07-change-mode-change\t&&\n+\t echo \"Changed and have mode changed\" >07-change-mode-change &&\n \t test_chmod +x 07-change-mode-change &&\n \t git commit -a -m \"Large commit\" &&\n \t git checkout master'\ndiff --git a/t/t9831-git-p4-triggers.sh b/t/t9831-git-p4-triggers.sh\nindex d743ca33ee..ff6c0352e6 100755\n--- a/t/t9831-git-p4-triggers.sh\n+++ b/t/t9831-git-p4-triggers.sh\n@@ -58,7 +58,7 @@ test_expect_success 'import with extra info lines from verbose p4 trigger' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit p4 sync\n-\t)&&\n+\t) &&\n \t(\n \t\tp4 triggers -i <<-EOF\n \t\tTriggers:\n-- \n2.25.1\n\n"},{"id":"393750","messageId":"xmqqr1xk6jj2.fsf@gitster.c.googlers.com","threadId":"52999","inReplyTo":"20200322211422.15129-2-rybak.a.v@gmail.com","subject":"Re: [PATCH v2 2/2] t: fix whitespace around &&","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-03-22T23:45:37Z","receivedAt":"2020-03-22T23:45:43Z","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\nThe latter is especially appreciated---people just don't pay\nattention and it is much harder to spot with eyeballs than the\nformer.\n\n> Also fix the space after redirection operator in t3701 while we're here.\n\nI started writing \"hmm, doesn't it belong to the previous step\" and\nthen realized that this one is a bat between animals and birds ;-)\n\nThanks.\n"}]}