{"thread":{"id":"55127","subject":"[PATCH v2 00/10] Modernizing the t7001 test script","startedAt":"2021-02-09T17:33:52Z","lastAt":"2021-02-11T08:00:47Z","messageCount":17,"participants":["shubham verma","Eric Sunshine","Junio C Hamano","Shubham Verma"],"isPatch":true,"patchVersion":2,"patchTotal":10},"messages":[{"id":"416528","messageId":"20210209173254.17712-1-shubhunic@gmail.com","threadId":"55127","inReplyTo":null,"subject":"[PATCH v2 00/10] Modernizing the t7001 test script","fromName":"shubham verma","fromEmail":"shubhunic@gmail.com","sentAt":"2021-02-09T17:32:44Z","receivedAt":"2021-02-09T17:33:52Z","isPatch":true,"sender":{"key":"shubhunic@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45103446?v=4"},"body":"In this patch series modernize the t7001 test script by changing the\nstyle of its tests from an old one to the modern one and by cleaning\nup the test script.\n\nChanges since v1:\n\n- Change commit messages and added brief explanation about commit.\n- Modernize subshell formatting\n- Use ': >' rather than '>'\n\nThanks everyone for your feedback and suggestions.\n\nshubham verma (10):\n  t7001: modernize test formatting\n  t7001: indent with TABs instead of spaces\n  t7001: remove unnecessary blank lines\n  t7001: modernize subshell formatting\n  t7001: remove whitespace after redirect operators\n  t7001: avoid using `cd` outside of subshells\n  t7001: use '>' rather than 'touch'\n  t7001: put each command on a separate line\n  t7001: use here-docs instead of echo\n  t7001: use `test` rather than `[`\n\n t/t7001-mv.sh | 432 ++++++++++++++++++++++++--------------------------\n 1 file changed, 204 insertions(+), 228 deletions(-)\n\n-- \n2.25.1\n\n"},{"id":"416529","messageId":"20210209173254.17712-2-shubhunic@gmail.com","threadId":"55127","inReplyTo":"20210209173254.17712-1-shubhunic@gmail.com","subject":"[PATCH v2 01/10] t7001: modernize test formatting","fromName":"shubham verma","fromEmail":"shubhunic@gmail.com","sentAt":"2021-02-09T17:32:45Z","receivedAt":"2021-02-09T17:33:53Z","isPatch":true,"sender":{"key":"shubhunic@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45103446?v=4"},"body":"Some tests in this script are formatted using a very old style:\n\n        test_expect_success \\\n            'title' \\\n            'body line 1 &&\n            body line 2'\n\nUpdate the formatting to the modern style:\n\n        test_expect_success 'title' '\n            body line 1 &&\n            body line 2\n        '\n\nSigned-off-by: shubham verma <shubhunic@gmail.com>\n---\n t/t7001-mv.sh | 192 +++++++++++++++++++++++++-------------------------\n 1 file changed, 96 insertions(+), 96 deletions(-)\n\ndiff --git a/t/t7001-mv.sh b/t/t7001-mv.sh\nindex 63d5f41a12..4bbb51e578 100755\n--- a/t/t7001-mv.sh\n+++ b/t/t7001-mv.sh\n@@ -3,74 +3,74 @@\n test_description='git mv in subdirs'\n . ./test-lib.sh\n \n-test_expect_success \\\n-    'prepare reference tree' \\\n-    'mkdir path0 path1 &&\n+test_expect_success 'prepare reference tree' '\n+     mkdir path0 path1 &&\n      cp \"$TEST_DIRECTORY\"/../COPYING path0/COPYING &&\n      git add path0/COPYING &&\n-     git commit -m add -a'\n+     git commit -m add -a\n+'\n \n-test_expect_success \\\n-    'moving the file out of subdirectory' \\\n-    'cd path0 && git mv COPYING ../path1/COPYING'\n+test_expect_success 'moving the file out of subdirectory' '\n+     cd path0 && git mv COPYING ../path1/COPYING\n+'\n \n # in path0 currently\n-test_expect_success \\\n-    'commiting the change' \\\n-    'cd .. && git commit -m move-out -a'\n+test_expect_success 'commiting the change' '\n+     cd .. && git commit -m move-out -a\n+'\n \n-test_expect_success \\\n-    'checking the commit' \\\n-    'git diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n-    grep \"^R100..*path0/COPYING..*path1/COPYING\" actual'\n+test_expect_success 'checking the commit' '\n+     git diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n+     grep \"^R100..*path0/COPYING..*path1/COPYING\" actual\n+'\n \n-test_expect_success \\\n-    'moving the file back into subdirectory' \\\n-    'cd path0 && git mv ../path1/COPYING COPYING'\n+test_expect_success 'moving the file back into subdirectory' '\n+     cd path0 && git mv ../path1/COPYING COPYING\n+'\n \n # in path0 currently\n-test_expect_success \\\n-    'commiting the change' \\\n-    'cd .. && git commit -m move-in -a'\n-\n-test_expect_success \\\n-    'checking the commit' \\\n-    'git diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n-    grep \"^R100..*path1/COPYING..*path0/COPYING\" actual'\n-\n-test_expect_success \\\n-    'mv --dry-run does not move file' \\\n-    'git mv -n path0/COPYING MOVED &&\n+test_expect_success 'commiting the change' '\n+     cd .. && git commit -m move-in -a\n+'\n+\n+test_expect_success 'checking the commit' '\n+     git diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n+     grep \"^R100..*path1/COPYING..*path0/COPYING\" actual\n+'\n+\n+test_expect_success 'mv --dry-run does not move file' '\n+     git mv -n path0/COPYING MOVED &&\n      test -f path0/COPYING &&\n-     test ! -f MOVED'\n+     test ! -f MOVED\n+'\n \n-test_expect_success \\\n-    'checking -k on non-existing file' \\\n-    'git mv -k idontexist path0'\n+test_expect_success 'checking -k on non-existing file' '\n+     git mv -k idontexist path0\n+'\n \n-test_expect_success \\\n-    'checking -k on untracked file' \\\n-    'touch untracked1 &&\n+test_expect_success 'checking -k on untracked file' '\n+     touch untracked1 &&\n      git mv -k untracked1 path0 &&\n      test -f untracked1 &&\n-     test ! -f path0/untracked1'\n+     test ! -f path0/untracked1\n+'\n \n-test_expect_success \\\n-    'checking -k on multiple untracked files' \\\n-    'touch untracked2 &&\n+test_expect_success 'checking -k on multiple untracked files' '\n+     touch untracked2 &&\n      git mv -k untracked1 untracked2 path0 &&\n      test -f untracked1 &&\n      test -f untracked2 &&\n      test ! -f path0/untracked1 &&\n-     test ! -f path0/untracked2'\n+     test ! -f path0/untracked2\n+'\n \n-test_expect_success \\\n-    'checking -f on untracked file with existing target' \\\n-    'touch path0/untracked1 &&\n+test_expect_success 'checking -f on untracked file with existing target' '\n+     touch path0/untracked1 &&\n      test_must_fail git mv -f untracked1 path0 &&\n      test ! -f .git/index.lock &&\n      test -f untracked1 &&\n-     test -f path0/untracked1'\n+     test -f path0/untracked1\n+'\n \n # clean up the mess in case bad things happen\n rm -f idontexist untracked1 untracked2 \\\n@@ -78,79 +78,79 @@ rm -f idontexist untracked1 untracked2 \\\n      .git/index.lock\n rmdir path1\n \n-test_expect_success \\\n-    'moving to absent target with trailing slash' \\\n-    'test_must_fail git mv path0/COPYING no-such-dir/ &&\n+test_expect_success 'moving to absent target with trailing slash' '\n+     test_must_fail git mv path0/COPYING no-such-dir/ &&\n      test_must_fail git mv path0/COPYING no-such-dir// &&\n      git mv path0/ no-such-dir/ &&\n-     test_path_is_dir no-such-dir'\n+     test_path_is_dir no-such-dir\n+'\n \n-test_expect_success \\\n-    'clean up' \\\n-    'git reset --hard'\n+test_expect_success 'clean up' '\n+     git reset --hard\n+'\n \n-test_expect_success \\\n-    'moving to existing untracked target with trailing slash' \\\n-    'mkdir path1 &&\n+test_expect_success 'moving to existing untracked target with trailing slash' '\n+     mkdir path1 &&\n      git mv path0/ path1/ &&\n-     test_path_is_dir path1/path0/'\n+     test_path_is_dir path1/path0/\n+'\n \n-test_expect_success \\\n-    'moving to existing tracked target with trailing slash' \\\n-    'mkdir path2 &&\n+test_expect_success 'moving to existing tracked target with trailing slash' '\n+     mkdir path2 &&\n      >path2/file && git add path2/file &&\n      git mv path1/path0/ path2/ &&\n-     test_path_is_dir path2/path0/'\n+     test_path_is_dir path2/path0/\n+'\n \n-test_expect_success \\\n-    'clean up' \\\n-    'git reset --hard'\n+test_expect_success 'clean up' '\n+     git reset --hard\n+'\n \n-test_expect_success \\\n-    'adding another file' \\\n-    'cp \"$TEST_DIRECTORY\"/../README.md path0/README &&\n+test_expect_success 'adding another file' '\n+     cp \"$TEST_DIRECTORY\"/../README.md path0/README &&\n      git add path0/README &&\n-     git commit -m add2 -a'\n+     git commit -m add2 -a\n+'\n \n-test_expect_success \\\n-    'moving whole subdirectory' \\\n-    'git mv path0 path2'\n+test_expect_success 'moving whole subdirectory' '\n+     git mv path0 path2\n+'\n \n-test_expect_success \\\n-    'commiting the change' \\\n-    'git commit -m dir-move -a'\n+test_expect_success 'commiting the change' '\n+     git commit -m dir-move -a\n+'\n \n-test_expect_success \\\n-    'checking the commit' \\\n-    'git diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n+test_expect_success 'checking the commit' '\n+     git diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n      grep \"^R100..*path0/COPYING..*path2/COPYING\" actual &&\n-     grep \"^R100..*path0/README..*path2/README\" actual'\n+     grep \"^R100..*path0/README..*path2/README\" actual\n+'\n \n-test_expect_success \\\n-    'succeed when source is a prefix of destination' \\\n-    'git mv path2/COPYING path2/COPYING-renamed'\n+test_expect_success 'succeed when source is a prefix of destination' '\n+     git mv path2/COPYING path2/COPYING-renamed\n+'\n \n-test_expect_success \\\n-    'moving whole subdirectory into subdirectory' \\\n-    'git mv path2 path1'\n+test_expect_success 'moving whole subdirectory into subdirectory' '\n+     git mv path2 path1\n+'\n \n-test_expect_success \\\n-    'commiting the change' \\\n-    'git commit -m dir-move -a'\n+test_expect_success 'commiting the change' '\n+     git commit -m dir-move -a\n+'\n \n-test_expect_success \\\n-    'checking the commit' \\\n-    'git diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n+test_expect_success 'checking the commit' '\n+     git diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n      grep \"^R100..*path2/COPYING..*path1/path2/COPYING\" actual &&\n-     grep \"^R100..*path2/README..*path1/path2/README\" actual'\n+     grep \"^R100..*path2/README..*path1/path2/README\" actual\n+'\n \n-test_expect_success \\\n-    'do not move directory over existing directory' \\\n-    'mkdir path0 && mkdir path0/path2 && test_must_fail git mv path2 path0'\n+test_expect_success 'do not move directory over existing directory' '\n+     mkdir path0 && mkdir path0/path2 && test_must_fail git mv path2 path0\n+'\n \n-test_expect_success \\\n-    'move into \".\"' \\\n-    'git mv path1/path2/ .'\n+test_expect_success 'move into \".\"' '\n+     git mv path1/path2/ .\n+'\n \n test_expect_success \"Michael Cassar's test case\" '\n \trm -fr .git papers partA &&\n-- \n2.25.1\n\n"},{"id":"416530","messageId":"20210209173254.17712-3-shubhunic@gmail.com","threadId":"55127","inReplyTo":"20210209173254.17712-1-shubhunic@gmail.com","subject":"[PATCH v2 02/10] t7001: indent with TABs instead of spaces","fromName":"shubham verma","fromEmail":"shubhunic@gmail.com","sentAt":"2021-02-09T17:32:46Z","receivedAt":"2021-02-09T17:33:55Z","isPatch":true,"sender":{"key":"shubhunic@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45103446?v=4"},"body":"Signed-off-by: shubham verma <shubhunic@gmail.com>\n---\n t/t7001-mv.sh | 120 +++++++++++++++++++++++++-------------------------\n 1 file changed, 60 insertions(+), 60 deletions(-)\n\ndiff --git a/t/t7001-mv.sh b/t/t7001-mv.sh\nindex 4bbb51e578..7503233814 100755\n--- a/t/t7001-mv.sh\n+++ b/t/t7001-mv.sh\n@@ -4,72 +4,72 @@ test_description='git mv in subdirs'\n . ./test-lib.sh\n \n test_expect_success 'prepare reference tree' '\n-     mkdir path0 path1 &&\n-     cp \"$TEST_DIRECTORY\"/../COPYING path0/COPYING &&\n-     git add path0/COPYING &&\n-     git commit -m add -a\n+\tmkdir path0 path1 &&\n+\tcp \"$TEST_DIRECTORY\"/../COPYING path0/COPYING &&\n+\tgit add path0/COPYING &&\n+\tgit commit -m add -a\n '\n \n test_expect_success 'moving the file out of subdirectory' '\n-     cd path0 && git mv COPYING ../path1/COPYING\n+\tcd path0 && git mv COPYING ../path1/COPYING\n '\n \n # in path0 currently\n test_expect_success 'commiting the change' '\n-     cd .. && git commit -m move-out -a\n+\tcd .. && git commit -m move-out -a\n '\n \n test_expect_success 'checking the commit' '\n-     git diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n-     grep \"^R100..*path0/COPYING..*path1/COPYING\" actual\n+\tgit diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n+\tgrep \"^R100..*path0/COPYING..*path1/COPYING\" actual\n '\n \n test_expect_success 'moving the file back into subdirectory' '\n-     cd path0 && git mv ../path1/COPYING COPYING\n+\tcd path0 && git mv ../path1/COPYING COPYING\n '\n \n # in path0 currently\n test_expect_success 'commiting the change' '\n-     cd .. && git commit -m move-in -a\n+\tcd .. && git commit -m move-in -a\n '\n \n test_expect_success 'checking the commit' '\n-     git diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n-     grep \"^R100..*path1/COPYING..*path0/COPYING\" actual\n+\tgit diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n+\tgrep \"^R100..*path1/COPYING..*path0/COPYING\" actual\n '\n \n test_expect_success 'mv --dry-run does not move file' '\n-     git mv -n path0/COPYING MOVED &&\n-     test -f path0/COPYING &&\n-     test ! -f MOVED\n+\tgit mv -n path0/COPYING MOVED &&\n+\ttest -f path0/COPYING &&\n+\ttest ! -f MOVED\n '\n \n test_expect_success 'checking -k on non-existing file' '\n-     git mv -k idontexist path0\n+\tgit mv -k idontexist path0\n '\n \n test_expect_success 'checking -k on untracked file' '\n-     touch untracked1 &&\n-     git mv -k untracked1 path0 &&\n-     test -f untracked1 &&\n-     test ! -f path0/untracked1\n+\ttouch untracked1 &&\n+\tgit mv -k untracked1 path0 &&\n+\ttest -f untracked1 &&\n+\ttest ! -f path0/untracked1\n '\n \n test_expect_success 'checking -k on multiple untracked files' '\n-     touch untracked2 &&\n-     git mv -k untracked1 untracked2 path0 &&\n-     test -f untracked1 &&\n-     test -f untracked2 &&\n-     test ! -f path0/untracked1 &&\n-     test ! -f path0/untracked2\n+\ttouch untracked2 &&\n+\tgit mv -k untracked1 untracked2 path0 &&\n+\ttest -f untracked1 &&\n+\ttest -f untracked2 &&\n+\ttest ! -f path0/untracked1 &&\n+\ttest ! -f path0/untracked2\n '\n \n test_expect_success 'checking -f on untracked file with existing target' '\n-     touch path0/untracked1 &&\n-     test_must_fail git mv -f untracked1 path0 &&\n-     test ! -f .git/index.lock &&\n-     test -f untracked1 &&\n-     test -f path0/untracked1\n+\ttouch path0/untracked1 &&\n+\ttest_must_fail git mv -f untracked1 path0 &&\n+\ttest ! -f .git/index.lock &&\n+\ttest -f untracked1 &&\n+\ttest -f path0/untracked1\n '\n \n # clean up the mess in case bad things happen\n@@ -79,77 +79,77 @@ rm -f idontexist untracked1 untracked2 \\\n rmdir path1\n \n test_expect_success 'moving to absent target with trailing slash' '\n-     test_must_fail git mv path0/COPYING no-such-dir/ &&\n-     test_must_fail git mv path0/COPYING no-such-dir// &&\n-     git mv path0/ no-such-dir/ &&\n-     test_path_is_dir no-such-dir\n+\ttest_must_fail git mv path0/COPYING no-such-dir/ &&\n+\ttest_must_fail git mv path0/COPYING no-such-dir// &&\n+\tgit mv path0/ no-such-dir/ &&\n+\ttest_path_is_dir no-such-dir\n '\n \n test_expect_success 'clean up' '\n-     git reset --hard\n+\tgit reset --hard\n '\n \n test_expect_success 'moving to existing untracked target with trailing slash' '\n-     mkdir path1 &&\n-     git mv path0/ path1/ &&\n-     test_path_is_dir path1/path0/\n+\tmkdir path1 &&\n+\tgit mv path0/ path1/ &&\n+\ttest_path_is_dir path1/path0/\n '\n \n test_expect_success 'moving to existing tracked target with trailing slash' '\n-     mkdir path2 &&\n-     >path2/file && git add path2/file &&\n-     git mv path1/path0/ path2/ &&\n-     test_path_is_dir path2/path0/\n+\tmkdir path2 &&\n+\t>path2/file && git add path2/file &&\n+\tgit mv path1/path0/ path2/ &&\n+\ttest_path_is_dir path2/path0/\n '\n \n test_expect_success 'clean up' '\n-     git reset --hard\n+\tgit reset --hard\n '\n \n test_expect_success 'adding another file' '\n-     cp \"$TEST_DIRECTORY\"/../README.md path0/README &&\n-     git add path0/README &&\n-     git commit -m add2 -a\n+\tcp \"$TEST_DIRECTORY\"/../README.md path0/README &&\n+\tgit add path0/README &&\n+\tgit commit -m add2 -a\n '\n \n test_expect_success 'moving whole subdirectory' '\n-     git mv path0 path2\n+\tgit mv path0 path2\n '\n \n test_expect_success 'commiting the change' '\n-     git commit -m dir-move -a\n+\tgit commit -m dir-move -a\n '\n \n test_expect_success 'checking the commit' '\n-     git diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n-     grep \"^R100..*path0/COPYING..*path2/COPYING\" actual &&\n-     grep \"^R100..*path0/README..*path2/README\" actual\n+\tgit diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n+\tgrep \"^R100..*path0/COPYING..*path2/COPYING\" actual &&\n+\tgrep \"^R100..*path0/README..*path2/README\" actual\n '\n \n test_expect_success 'succeed when source is a prefix of destination' '\n-     git mv path2/COPYING path2/COPYING-renamed\n+\tgit mv path2/COPYING path2/COPYING-renamed\n '\n \n test_expect_success 'moving whole subdirectory into subdirectory' '\n-     git mv path2 path1\n+\tgit mv path2 path1\n '\n \n test_expect_success 'commiting the change' '\n-     git commit -m dir-move -a\n+\tgit commit -m dir-move -a\n '\n \n test_expect_success 'checking the commit' '\n-     git diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n-     grep \"^R100..*path2/COPYING..*path1/path2/COPYING\" actual &&\n-     grep \"^R100..*path2/README..*path1/path2/README\" actual\n+\tgit diff-tree -r -M --name-status  HEAD^ HEAD >actual &&\n+\tgrep \"^R100..*path2/COPYING..*path1/path2/COPYING\" actual &&\n+\tgrep \"^R100..*path2/README..*path1/path2/README\" actual\n '\n \n test_expect_success 'do not move directory over existing directory' '\n-     mkdir path0 && mkdir path0/path2 && test_must_fail git mv path2 path0\n+\tmkdir path0 && mkdir path0/path2 && test_must_fail git mv path2 path0\n '\n \n test_expect_success 'move into \".\"' '\n-     git mv path1/path2/ .\n+\tgit mv path1/path2/ .\n '\n \n test_expect_success \"Michael Cassar's test case\" '\n-- \n2.25.1\n\n"},{"id":"416531","messageId":"20210209173254.17712-4-shubhunic@gmail.com","threadId":"55127","inReplyTo":"20210209173254.17712-1-shubhunic@gmail.com","subject":"[PATCH v2 03/10] t7001: remove unnecessary blank lines","fromName":"shubham verma","fromEmail":"shubhunic@gmail.com","sentAt":"2021-02-09T17:32:47Z","receivedAt":"2021-02-09T17:33:57Z","isPatch":true,"sender":{"key":"shubhunic@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45103446?v=4"},"body":"Some tests use a deprecated style in which there are unnecessary\nblank lines after the opening quote of the test body and before the\nclosing quote. So we should remove these unnecessary blank lines.\n\nSigned-off-by: shubham verma <shubhunic@gmail.com>\n---\n t/t7001-mv.sh | 12 ------------\n 1 file changed, 12 deletions(-)\n\ndiff --git a/t/t7001-mv.sh b/t/t7001-mv.sh\nindex 7503233814..f63802442b 100755\n--- a/t/t7001-mv.sh\n+++ b/t/t7001-mv.sh\n@@ -182,7 +182,6 @@ test_expect_success \"Sergey Vlasov's test case\" '\n '\n \n test_expect_success 'absolute pathname' '(\n-\n \trm -fr mine &&\n \tmkdir mine &&\n \tcd mine &&\n@@ -196,12 +195,9 @@ test_expect_success 'absolute pathname' '(\n \t! test -d sub &&\n \ttest -d in &&\n \tgit ls-files --error-unmatch in/file\n-\n-\n )'\n \n test_expect_success 'absolute pathname outside should fail' '(\n-\n \trm -fr mine &&\n \tmkdir mine &&\n \tcd mine &&\n@@ -216,7 +212,6 @@ test_expect_success 'absolute pathname outside should fail' '(\n \ttest -d sub &&\n \t! test -d ../in &&\n \tgit ls-files --error-unmatch sub/file\n-\n )'\n \n test_expect_success 'git mv to move multiple sources into a directory' '\n@@ -232,7 +227,6 @@ test_expect_success 'git mv to move multiple sources into a directory' '\n '\n \n test_expect_success 'git mv should not change sha1 of moved cache entry' '\n-\n \trm -fr .git &&\n \tgit init &&\n \techo 1 >dirty &&\n@@ -243,7 +237,6 @@ test_expect_success 'git mv should not change sha1 of moved cache entry' '\n \techo 2 >dirty2 &&\n \tgit mv dirty2 dirty &&\n \t[ \"$entry\" = \"$(git ls-files --stage dirty | cut -f 1)\" ]\n-\n '\n \n rm -f dirty dirty2\n@@ -266,7 +259,6 @@ test_expect_success 'git mv error on conflicted file' '\n '\n \n test_expect_success 'git mv should overwrite symlink to a file' '\n-\n \trm -fr .git &&\n \tgit init &&\n \techo 1 >moved &&\n@@ -279,13 +271,11 @@ test_expect_success 'git mv should overwrite symlink to a file' '\n \ttest \"$(cat symlink)\" = 1 &&\n \tgit update-index --refresh &&\n \tgit diff-files --quiet\n-\n '\n \n rm -f moved symlink\n \n test_expect_success 'git mv should overwrite file with a symlink' '\n-\n \trm -fr .git &&\n \tgit init &&\n \techo 1 >moved &&\n@@ -296,11 +286,9 @@ test_expect_success 'git mv should overwrite file with a symlink' '\n \t! test -e symlink &&\n \tgit update-index --refresh &&\n \tgit diff-files --quiet\n-\n '\n \n test_expect_success SYMLINKS 'check moved symlink' '\n-\n \ttest -h moved\n '\n \n-- \n2.25.1\n\n"},{"id":"416532","messageId":"20210209173254.17712-5-shubhunic@gmail.com","threadId":"55127","inReplyTo":"20210209173254.17712-1-shubhunic@gmail.com","subject":"[PATCH v2 04/10] t7001: modernize subshell formatting","fromName":"shubham verma","fromEmail":"shubhunic@gmail.com","sentAt":"2021-02-09T17:32:48Z","receivedAt":"2021-02-09T17:34:04Z","isPatch":true,"sender":{"key":"shubhunic@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45103446?v=4"},"body":"Some test use an old style for formatting subshells:\n\n        (command &&\n            ...\n\nUpdate them to the modern style:\n\n        (\n            command &&\n            ...\n\nSigned-off-by: shubham verma <shubhunic@gmail.com>\n---\n t/t7001-mv.sh | 74 ++++++++++++++++++++++++++++-----------------------\n 1 file changed, 40 insertions(+), 34 deletions(-)\n\ndiff --git a/t/t7001-mv.sh b/t/t7001-mv.sh\nindex f63802442b..a4a14a3b2e 100755\n--- a/t/t7001-mv.sh\n+++ b/t/t7001-mv.sh\n@@ -181,38 +181,42 @@ test_expect_success \"Sergey Vlasov's test case\" '\n \tgit mv ab a\n '\n \n-test_expect_success 'absolute pathname' '(\n-\trm -fr mine &&\n-\tmkdir mine &&\n-\tcd mine &&\n-\ttest_create_repo one &&\n-\tcd one &&\n-\tmkdir sub &&\n-\t>sub/file &&\n-\tgit add sub/file &&\n-\n-\tgit mv sub \"$(pwd)/in\" &&\n-\t! test -d sub &&\n-\ttest -d in &&\n-\tgit ls-files --error-unmatch in/file\n-)'\n-\n-test_expect_success 'absolute pathname outside should fail' '(\n-\trm -fr mine &&\n-\tmkdir mine &&\n-\tcd mine &&\n-\tout=$(pwd) &&\n-\ttest_create_repo one &&\n-\tcd one &&\n-\tmkdir sub &&\n-\t>sub/file &&\n-\tgit add sub/file &&\n-\n-\ttest_must_fail git mv sub \"$out/out\" &&\n-\ttest -d sub &&\n-\t! test -d ../in &&\n-\tgit ls-files --error-unmatch sub/file\n-)'\n+test_expect_success 'absolute pathname' '\n+\t(\n+\t\trm -fr mine &&\n+\t\tmkdir mine &&\n+\t\tcd mine &&\n+\t\ttest_create_repo one &&\n+\t\tcd one &&\n+\t\tmkdir sub &&\n+\t\t>sub/file &&\n+\t\tgit add sub/file &&\n+\n+\t\tgit mv sub \"$(pwd)/in\" &&\n+\t\t! test -d sub &&\n+\t\ttest -d in &&\n+\t\tgit ls-files --error-unmatch in/file\n+\t)\n+'\n+\n+test_expect_success 'absolute pathname outside should fail' '\n+\t(\n+\t\trm -fr mine &&\n+\t\tmkdir mine &&\n+\t\tcd mine &&\n+\t\tout=$(pwd) &&\n+\t\ttest_create_repo one &&\n+\t\tcd one &&\n+\t\tmkdir sub &&\n+\t\t>sub/file &&\n+\t\tgit add sub/file &&\n+\n+\t\ttest_must_fail git mv sub \"$out/out\" &&\n+\t\ttest -d sub &&\n+\t\t! test -d ../in &&\n+\t\tgit ls-files --error-unmatch sub/file\n+\t)\n+'\n \n test_expect_success 'git mv to move multiple sources into a directory' '\n \trm -fr .git && git init &&\n@@ -503,14 +507,16 @@ test_expect_success 'moving a submodule in nested directories' '\n test_expect_success 'moving nested submodules' '\n \tgit commit -am \"cleanup commit\" &&\n \tmkdir sub_nested_nested &&\n-\t(cd sub_nested_nested &&\n+\t(\n+\t\tcd sub_nested_nested &&\n \t\ttouch nested_level2 &&\n \t\tgit init &&\n \t\tgit add . &&\n \t\tgit commit -m \"nested level 2\"\n \t) &&\n \tmkdir sub_nested &&\n-\t(cd sub_nested &&\n+\t(\n+\t\tcd sub_nested &&\n \t\ttouch nested_level1 &&\n \t\tgit init &&\n \t\tgit add . &&\n-- \n2.25.1\n\n"},{"id":"416533","messageId":"20210209173254.17712-10-shubhunic@gmail.com","threadId":"55127","inReplyTo":"20210209173254.17712-1-shubhunic@gmail.com","subject":"[PATCH v2 09/10] t7001: use here-docs instead of echo","fromName":"shubham verma","fromEmail":"shubhunic@gmail.com","sentAt":"2021-02-09T17:32:53Z","receivedAt":"2021-02-09T17:35:17Z","isPatch":true,"sender":{"key":"shubhunic@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45103446?v=4"},"body":"Change from old style to current style by taking advantage of\nhere-docs instead of echo commands.\n\nSigned-off-by: shubham verma <shubhunic@gmail.com>\n---\n t/t7001-mv.sh | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t7001-mv.sh b/t/t7001-mv.sh\nindex 9a73232c7c..2e2e60e0d3 100755\n--- a/t/t7001-mv.sh\n+++ b/t/t7001-mv.sh\n@@ -226,7 +226,10 @@ test_expect_success 'git mv to move multiple sources into a directory' '\n \tgit add dir/?.txt &&\n \tgit mv dir/a.txt dir/b.txt other &&\n \tgit ls-files >actual &&\n-\t{ echo other/a.txt; echo other/b.txt; } >expect &&\n+\tcat >expect <<-\\EOF &&\n+\tother/a.txt\n+\tother/b.txt\n+\tEOF\n \ttest_cmp expect actual\n '\n \n-- \n2.25.1\n\n"},{"id":"416534","messageId":"20210209173254.17712-8-shubhunic@gmail.com","threadId":"55127","inReplyTo":"20210209173254.17712-1-shubhunic@gmail.com","subject":"[PATCH v2 07/10] t7001: use '>' rather than 'touch'","fromName":"shubham verma","fromEmail":"shubhunic@gmail.com","sentAt":"2021-02-09T17:32:51Z","receivedAt":"2021-02-09T17:35:29Z","isPatch":true,"sender":{"key":"shubhunic@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45103446?v=4"},"body":"Use `>` rather than `touch` to create an empty file when the\ntimestamp isn't relevant to the test.\n\nSigned-off-by: shubham verma <shubhunic@gmail.com>\n---\n t/t7001-mv.sh | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t7001-mv.sh b/t/t7001-mv.sh\nindex 81897a3095..1671241fc8 100755\n--- a/t/t7001-mv.sh\n+++ b/t/t7001-mv.sh\n@@ -47,14 +47,14 @@ test_expect_success 'checking -k on non-existing file' '\n '\n \n test_expect_success 'checking -k on untracked file' '\n-\ttouch untracked1 &&\n+\t>untracked1 &&\n \tgit mv -k untracked1 path0 &&\n \ttest -f untracked1 &&\n \ttest ! -f path0/untracked1\n '\n \n test_expect_success 'checking -k on multiple untracked files' '\n-\ttouch untracked2 &&\n+\t>untracked2 &&\n \tgit mv -k untracked1 untracked2 path0 &&\n \ttest -f untracked1 &&\n \ttest -f untracked2 &&\n@@ -63,7 +63,7 @@ test_expect_success 'checking -k on multiple untracked files' '\n '\n \n test_expect_success 'checking -f on untracked file with existing target' '\n-\ttouch path0/untracked1 &&\n+\t>path0/untracked1 &&\n \ttest_must_fail git mv -f untracked1 path0 &&\n \ttest ! -f .git/index.lock &&\n \ttest -f untracked1 &&\n@@ -486,7 +486,7 @@ test_expect_success 'moving nested submodules' '\n \tmkdir sub_nested_nested &&\n \t(\n \t\tcd sub_nested_nested &&\n-\t\ttouch nested_level2 &&\n+\t\t>nested_level2 &&\n \t\tgit init &&\n \t\tgit add . &&\n \t\tgit commit -m \"nested level 2\"\n@@ -494,7 +494,7 @@ test_expect_success 'moving nested submodules' '\n \tmkdir sub_nested &&\n \t(\n \t\tcd sub_nested &&\n-\t\ttouch nested_level1 &&\n+\t\t>nested_level1 &&\n \t\tgit init &&\n \t\tgit add . &&\n \t\tgit commit -m \"nested level 1\" &&\n-- \n2.25.1\n\n"},{"id":"416535","messageId":"20210209173254.17712-6-shubhunic@gmail.com","threadId":"55127","inReplyTo":"20210209173254.17712-1-shubhunic@gmail.com","subject":"[PATCH v2 05/10] t7001: remove whitespace after redirect operators","fromName":"shubham verma","fromEmail":"shubhunic@gmail.com","sentAt":"2021-02-09T17:32:49Z","receivedAt":"2021-02-09T17:35:40Z","isPatch":true,"sender":{"key":"shubhunic@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45103446?v=4"},"body":"According to Documentation/CodingGuidelines, there should be no\nwhitespace after redirect operators. So, we should remove these\nwhitespaces after redirect operators.\n\nSigned-off-by: shubham verma <shubhunic@gmail.com>\n---\n t/t7001-mv.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t7001-mv.sh b/t/t7001-mv.sh\nindex a4a14a3b2e..02fbc90dea 100755\n--- a/t/t7001-mv.sh\n+++ b/t/t7001-mv.sh\n@@ -156,9 +156,9 @@ test_expect_success \"Michael Cassar's test case\" '\n \trm -fr .git papers partA &&\n \tgit init &&\n \tmkdir -p papers/unsorted papers/all-papers partA &&\n-\techo a > papers/unsorted/Thesis.pdf &&\n-\techo b > partA/outline.txt &&\n-\techo c > papers/unsorted/_another &&\n+\techo a >papers/unsorted/Thesis.pdf &&\n+\techo b >partA/outline.txt &&\n+\techo c >papers/unsorted/_another &&\n \tgit add papers partA &&\n \tT1=$(git write-tree) &&\n \n-- \n2.25.1\n\n"},{"id":"416536","messageId":"20210209173254.17712-7-shubhunic@gmail.com","threadId":"55127","inReplyTo":"20210209173254.17712-1-shubhunic@gmail.com","subject":"[PATCH v2 06/10] t7001: avoid using `cd` outside of subshells","fromName":"shubham verma","fromEmail":"shubhunic@gmail.com","sentAt":"2021-02-09T17:32:50Z","receivedAt":"2021-02-09T17:35:43Z","isPatch":true,"sender":{"key":"shubhunic@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45103446?v=4"},"body":"Avoid using `cd` outside of subshells since, if the test fails,\nthere is no guarantee that the current working directory is the\nexpected one, which may cause subsequent tests to run in the wrong\ndirectory.\n\nWhile at it, make some other tests more concise by replacing\nsimple subshells with `git -C`.\n\nSigned-off-by: shubham verma <shubhunic@gmail.com>\n---\n t/t7001-mv.sh | 45 +++++++++++----------------------------------\n 1 file changed, 11 insertions(+), 34 deletions(-)\n\ndiff --git a/t/t7001-mv.sh b/t/t7001-mv.sh\nindex 02fbc90dea..81897a3095 100755\n--- a/t/t7001-mv.sh\n+++ b/t/t7001-mv.sh\n@@ -11,12 +11,11 @@ test_expect_success 'prepare reference tree' '\n '\n \n test_expect_success 'moving the file out of subdirectory' '\n-\tcd path0 && git mv COPYING ../path1/COPYING\n+\tgit -C path0 mv COPYING ../path1/COPYING\n '\n \n-# in path0 currently\n test_expect_success 'commiting the change' '\n-\tcd .. && git commit -m move-out -a\n+\tgit commit -m move-out -a\n '\n \n test_expect_success 'checking the commit' '\n@@ -25,12 +24,11 @@ test_expect_success 'checking the commit' '\n '\n \n test_expect_success 'moving the file back into subdirectory' '\n-\tcd path0 && git mv ../path1/COPYING COPYING\n+\tgit -C path0 mv ../path1/COPYING COPYING\n '\n \n-# in path0 currently\n test_expect_success 'commiting the change' '\n-\tcd .. && git commit -m move-in -a\n+\tgit commit -m move-in -a\n '\n \n test_expect_success 'checking the commit' '\n@@ -328,10 +326,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and no .gitm\n \tgit mv sub mod/sub &&\n \t! test -e sub &&\n \t[ \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" ] &&\n-\t(\n-\t\tcd mod/sub &&\n-\t\tgit status\n-\t) &&\n+\tgit -C mod/sub status &&\n \tgit update-index --refresh &&\n \tgit diff-files --quiet\n '\n@@ -351,10 +346,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and .gitmodu\n \tgit mv sub mod/sub &&\n \t! test -e sub &&\n \t[ \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" ] &&\n-\t(\n-\t\tcd mod/sub &&\n-\t\tgit status\n-\t) &&\n+\tgit -C mod/sub status &&\n \techo mod/sub >expected &&\n \tgit config -f .gitmodules submodule.sub.path >actual &&\n \ttest_cmp expected actual &&\n@@ -368,16 +360,10 @@ test_expect_success 'git mv moves a submodule with gitfile' '\n \tgit submodule update &&\n \tentry=\"$(git ls-files --stage sub | cut -f 1)\" &&\n \tmkdir mod &&\n-\t(\n-\t\tcd mod &&\n-\t\tgit mv ../sub/ .\n-\t) &&\n+\tgit -C mod mv ../sub/ . &&\n \t! test -e sub &&\n \t[ \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" ] &&\n-\t(\n-\t\tcd mod/sub &&\n-\t\tgit status\n-\t) &&\n+\tgit -C mod/sub status &&\n \techo mod/sub >expected &&\n \tgit config -f .gitmodules submodule.sub.path >actual &&\n \ttest_cmp expected actual &&\n@@ -396,10 +382,7 @@ test_expect_success 'mv does not complain when no .gitmodules file is found' '\n \ttest_must_be_empty actual.err &&\n \t! test -e sub &&\n \t[ \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" ] &&\n-\t(\n-\t\tcd mod/sub &&\n-\t\tgit status\n-\t) &&\n+\tgit -C mod/sub status &&\n \tgit update-index --refresh &&\n \tgit diff-files --quiet\n '\n@@ -420,10 +403,7 @@ test_expect_success 'mv will error out on a modified .gitmodules file unless sta\n \ttest_must_be_empty actual.err &&\n \t! test -e sub &&\n \t[ \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" ] &&\n-\t(\n-\t\tcd mod/sub &&\n-\t\tgit status\n-\t) &&\n+\tgit -C mod/sub status &&\n \tgit update-index --refresh &&\n \tgit diff-files --quiet\n '\n@@ -441,10 +421,7 @@ test_expect_success 'mv issues a warning when section is not found in .gitmodule\n \ttest_i18ncmp expect.err actual.err &&\n \t! test -e sub &&\n \t[ \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" ] &&\n-\t(\n-\t\tcd mod/sub &&\n-\t\tgit status\n-\t) &&\n+\tgit -C mod/sub status &&\n \tgit update-index --refresh &&\n \tgit diff-files --quiet\n '\n-- \n2.25.1\n\n"},{"id":"416537","messageId":"20210209173254.17712-9-shubhunic@gmail.com","threadId":"55127","inReplyTo":"20210209173254.17712-1-shubhunic@gmail.com","subject":"[PATCH v2 08/10] t7001: put each command on a separate line","fromName":"shubham verma","fromEmail":"shubhunic@gmail.com","sentAt":"2021-02-09T17:32:52Z","receivedAt":"2021-02-09T17:35:48Z","isPatch":true,"sender":{"key":"shubhunic@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45103446?v=4"},"body":"Modern practice is to avoid multiple commands per line, and\ninstead place each command on its own line.\n\nSigned-off-by: shubham verma <shubhunic@gmail.com>\n---\n t/t7001-mv.sh | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t7001-mv.sh b/t/t7001-mv.sh\nindex 1671241fc8..9a73232c7c 100755\n--- a/t/t7001-mv.sh\n+++ b/t/t7001-mv.sh\n@@ -143,7 +143,9 @@ test_expect_success 'checking the commit' '\n '\n \n test_expect_success 'do not move directory over existing directory' '\n-\tmkdir path0 && mkdir path0/path2 && test_must_fail git mv path2 path0\n+\tmkdir path0 &&\n+\tmkdir path0/path2 &&\n+\ttest_must_fail git mv path2 path0\n '\n \n test_expect_success 'move into \".\"' '\n-- \n2.25.1\n\n"},{"id":"416538","messageId":"20210209173254.17712-11-shubhunic@gmail.com","threadId":"55127","inReplyTo":"20210209173254.17712-1-shubhunic@gmail.com","subject":"[PATCH v2 10/10] t7001: use `test` rather than `[`","fromName":"shubham verma","fromEmail":"shubhunic@gmail.com","sentAt":"2021-02-09T17:32:54Z","receivedAt":"2021-02-09T17:36:05Z","isPatch":true,"sender":{"key":"shubhunic@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45103446?v=4"},"body":"According to Documentation/CodingGuidelines, we should use \"test\"\nrather than \"[ ... ]\" in shell scripts, so let's replace the\n\"[ ... ]\" with \"test\" in the t7001 test script.\n\nSigned-off-by: shubham verma <shubhunic@gmail.com>\n---\n t/t7001-mv.sh | 16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t7001-mv.sh b/t/t7001-mv.sh\nindex 2e2e60e0d3..002e188549 100755\n--- a/t/t7001-mv.sh\n+++ b/t/t7001-mv.sh\n@@ -240,10 +240,10 @@ test_expect_success 'git mv should not change sha1 of moved cache entry' '\n \tgit add dirty &&\n \tentry=\"$(git ls-files --stage dirty | cut -f 1)\" &&\n \tgit mv dirty dirty2 &&\n-\t[ \"$entry\" = \"$(git ls-files --stage dirty2 | cut -f 1)\" ] &&\n+\ttest \"$entry\" = \"$(git ls-files --stage dirty2 | cut -f 1)\" &&\n \techo 2 >dirty2 &&\n \tgit mv dirty2 dirty &&\n-\t[ \"$entry\" = \"$(git ls-files --stage dirty | cut -f 1)\" ]\n+\ttest \"$entry\" = \"$(git ls-files --stage dirty | cut -f 1)\"\n '\n \n rm -f dirty dirty2\n@@ -330,7 +330,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and no .gitm\n \tmkdir mod &&\n \tgit mv sub mod/sub &&\n \t! test -e sub &&\n-\t[ \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" ] &&\n+\ttest \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" &&\n \tgit -C mod/sub status &&\n \tgit update-index --refresh &&\n \tgit diff-files --quiet\n@@ -350,7 +350,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and .gitmodu\n \tmkdir mod &&\n \tgit mv sub mod/sub &&\n \t! test -e sub &&\n-\t[ \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" ] &&\n+\ttest \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" &&\n \tgit -C mod/sub status &&\n \techo mod/sub >expected &&\n \tgit config -f .gitmodules submodule.sub.path >actual &&\n@@ -367,7 +367,7 @@ test_expect_success 'git mv moves a submodule with gitfile' '\n \tmkdir mod &&\n \tgit -C mod mv ../sub/ . &&\n \t! test -e sub &&\n-\t[ \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" ] &&\n+\ttest \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" &&\n \tgit -C mod/sub status &&\n \techo mod/sub >expected &&\n \tgit config -f .gitmodules submodule.sub.path >actual &&\n@@ -386,7 +386,7 @@ test_expect_success 'mv does not complain when no .gitmodules file is found' '\n \tgit mv sub mod/sub 2>actual.err &&\n \ttest_must_be_empty actual.err &&\n \t! test -e sub &&\n-\t[ \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" ] &&\n+\ttest \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" &&\n \tgit -C mod/sub status &&\n \tgit update-index --refresh &&\n \tgit diff-files --quiet\n@@ -407,7 +407,7 @@ test_expect_success 'mv will error out on a modified .gitmodules file unless sta\n \tgit mv sub mod/sub 2>actual.err &&\n \ttest_must_be_empty actual.err &&\n \t! test -e sub &&\n-\t[ \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" ] &&\n+\ttest \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" &&\n \tgit -C mod/sub status &&\n \tgit update-index --refresh &&\n \tgit diff-files --quiet\n@@ -425,7 +425,7 @@ test_expect_success 'mv issues a warning when section is not found in .gitmodule\n \tgit mv sub mod/sub 2>actual.err &&\n \ttest_i18ncmp expect.err actual.err &&\n \t! test -e sub &&\n-\t[ \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" ] &&\n+\ttest \"$entry\" = \"$(git ls-files --stage mod/sub | cut -f 1)\" &&\n \tgit -C mod/sub status &&\n \tgit update-index --refresh &&\n \tgit diff-files --quiet\n-- \n2.25.1\n\n"},{"id":"416548","messageId":"CAPig+cREkd2rdDzETBzwYFgra4WV7PdM6expXRrC=kdFnZMk5A@mail.gmail.com","threadId":"55127","inReplyTo":"20210209173254.17712-1-shubhunic@gmail.com","subject":"Re: [PATCH v2 00/10] Modernizing the t7001 test script","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2021-02-09T19:24:42Z","receivedAt":"2021-02-09T19:39:44Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Feb 9, 2021 at 12:35 PM shubham verma <shubhunic@gmail.com> wrote:\n> In this patch series modernize the t7001 test script by changing the\n> style of its tests from an old one to the modern one and by cleaning\n> up the test script.\n>\n> Changes since v1:\n>\n> - Change commit messages and added brief explanation about commit.\n> - Modernize subshell formatting\n> - Use ': >' rather than '>'\n\nFor readers new to this series, v1 is here:\nhttps://lore.kernel.org/git/20200925170256.11490-1-shubhunic@gmail.com/T/\n"},{"id":"416588","messageId":"xmqqy2fwyhjy.fsf@gitster.c.googlers.com","threadId":"55127","inReplyTo":"20210209173254.17712-1-shubhunic@gmail.com","subject":"Re: [PATCH v2 00/10] Modernizing the t7001 test script","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-02-09T22:58:41Z","receivedAt":"2021-02-09T23:13:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"shubham verma <shubhunic@gmail.com> writes:\n\n> In this patch series modernize the t7001 test script by changing the\n> style of its tests from an old one to the modern one and by cleaning\n> up the test script.\n>\n> Changes since v1:\n>\n> - Change commit messages and added brief explanation about commit.\n> - Modernize subshell formatting\n> - Use ': >' rather than '>'\n>\n> Thanks everyone for your feedback and suggestions.\n>\n> shubham verma (10):\n>   t7001: modernize test formatting\n>   t7001: indent with TABs instead of spaces\n>   t7001: remove unnecessary blank lines\n>   t7001: modernize subshell formatting\n>   t7001: remove whitespace after redirect operators\n>   t7001: avoid using `cd` outside of subshells\n>   t7001: use '>' rather than 'touch'\n>   t7001: put each command on a separate line\n>   t7001: use here-docs instead of echo\n>   t7001: use `test` rather than `[`\n>\n>  t/t7001-mv.sh | 432 ++++++++++++++++++++++++--------------------------\n>  1 file changed, 204 insertions(+), 228 deletions(-)\n\n\nI would have used test_write_lines instead of here-doc in 9/10, but\nthat is such a minor preference thing that it is not worth going\nback and replace.  Nothing else stood out during my cursory scan.\n\nWill queue; thanks.\n\n\n\n"},{"id":"416715","messageId":"CAPig+cSXi7Ct48gqkBVvBtOm6bMqDhPcxXeiK3ZytAitZXNT5Q@mail.gmail.com","threadId":"55127","inReplyTo":"xmqqy2fwyhjy.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v2 00/10] Modernizing the t7001 test script","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2021-02-11T07:28:54Z","receivedAt":"2021-02-11T07:29:49Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Feb 9, 2021 at 6:13 PM Junio C Hamano <gitster@pobox.com> wrote:\n> shubham verma <shubhunic@gmail.com> writes:\n> > In this patch series modernize the t7001 test script by changing the\n> > style of its tests from an old one to the modern one and by cleaning\n> > up the test script.\n> >\n> I would have used test_write_lines instead of here-doc in 9/10, but\n> that is such a minor preference thing that it is not worth going\n> back and replace.  Nothing else stood out during my cursory scan.\n\nI read over the entire series and likewise didn't find anything to\ncomment on, thus consider it in good shape. For what it's worth,\nconsider this series:\n\n    Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>\n"},{"id":"416719","messageId":"xmqq35y3ys0w.fsf@gitster.c.googlers.com","threadId":"55127","inReplyTo":"CAPig+cSXi7Ct48gqkBVvBtOm6bMqDhPcxXeiK3ZytAitZXNT5Q@mail.gmail.com","subject":"Re: [PATCH v2 00/10] Modernizing the t7001 test script","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-02-11T07:37:03Z","receivedAt":"2021-02-11T07:38:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> On Tue, Feb 9, 2021 at 6:13 PM Junio C Hamano <gitster@pobox.com> wrote:\n>> shubham verma <shubhunic@gmail.com> writes:\n>> > In this patch series modernize the t7001 test script by changing the\n>> > style of its tests from an old one to the modern one and by cleaning\n>> > up the test script.\n>> >\n>> I would have used test_write_lines instead of here-doc in 9/10, but\n>> that is such a minor preference thing that it is not worth going\n>> back and replace.  Nothing else stood out during my cursory scan.\n>\n> I read over the entire series and likewise didn't find anything to\n> comment on, thus consider it in good shape. For what it's worth,\n> consider this series:\n>\n>     Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>\n\nYup, this one looked good to me.  Thanks.\n\nExcept that the author's name were spelled in all lowercase, unlike\nv1, which made me wonder if it was intentional, that is.\n"},{"id":"416724","messageId":"CAD=kLpvfAz7wkvBfakbc6woNWdyOxrYn0XKgSPkmTNz2RCNkKw@mail.gmail.com","threadId":"55127","inReplyTo":"xmqq35y3ys0w.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v2 00/10] Modernizing the t7001 test script","fromName":"Shubham Verma","fromEmail":"shubhunic@gmail.com","sentAt":"2021-02-11T07:56:30Z","receivedAt":"2021-02-11T07:59:13Z","isPatch":true,"sender":{"key":"shubhunic@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45103446?v=4"},"body":"Thank You Eric and Junio.\n\nSorry I forget about spelling.\nOkay I will correct it and send a new patch series today.\n\nThank You!\n\n\nOn Thu, Feb 11, 2021 at 1:07 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Eric Sunshine <sunshine@sunshineco.com> writes:\n>\n> > On Tue, Feb 9, 2021 at 6:13 PM Junio C Hamano <gitster@pobox.com> wrote:\n> >> shubham verma <shubhunic@gmail.com> writes:\n> >> > In this patch series modernize the t7001 test script by changing the\n> >> > style of its tests from an old one to the modern one and by cleaning\n> >> > up the test script.\n> >> >\n> >> I would have used test_write_lines instead of here-doc in 9/10, but\n> >> that is such a minor preference thing that it is not worth going\n> >> back and replace.  Nothing else stood out during my cursory scan.\n> >\n> > I read over the entire series and likewise didn't find anything to\n> > comment on, thus consider it in good shape. For what it's worth,\n> > consider this series:\n> >\n> >     Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>\n>\n> Yup, this one looked good to me.  Thanks.\n>\n> Except that the author's name were spelled in all lowercase, unlike\n> v1, which made me wonder if it was intentional, that is.\n"},{"id":"416726","messageId":"CAPig+cSczM3i585_epR4HQ0AfB1qz_9uBbAk7E8TdO=htk-=4Q@mail.gmail.com","threadId":"55127","inReplyTo":"CAD=kLpvfAz7wkvBfakbc6woNWdyOxrYn0XKgSPkmTNz2RCNkKw@mail.gmail.com","subject":"Re: [PATCH v2 00/10] Modernizing the t7001 test script","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2021-02-11T07:59:10Z","receivedAt":"2021-02-11T08:00:47Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Feb 11, 2021 at 2:56 AM Shubham Verma <shubhunic@gmail.com> wrote:\n> Sorry I forget about spelling.\n> Okay I will correct it and send a new patch series today.\n\nPlease remember that the spelling of the author (From:) and\nSigned-off-by: should be the same.\n"}]}