{"thread":{"id":"54430","subject":"[PATCH 0/5][Outreachy] modernizing the test scripts","startedAt":"2020-10-15T17:57:49Z","lastAt":"2020-10-22T17:35:12Z","messageCount":60,"participants":["charvi-077","Christian Couder","Charvi Mendiratta","Đoàn Trần Công Danh","Phillip Wood","Taylor Blau","Junio C Hamano","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"407644","messageId":"20201015175709.20121-1-charvi077@gmail.com","threadId":"54430","inReplyTo":null,"subject":"[PATCH 0/5][Outreachy] modernizing the test scripts","fromName":"charvi-077","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-15T17:57:04Z","receivedAt":"2020-10-15T17:57:49Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"This is my first patch series to the GIT mailing list. I followed the\nlink[1] and t7001 patches to modernize and clean up the test scripts.\n\nThis patch series : \n -modernize the three test scripts : t7101 , t7201 and t102. \n - cleans up with 5 types of changes in all the three scripts.\n   1. Converting the old old style test format to new one\n   2. Removing blankspaces in test bodies \n   3. Removing whitespaces after the redirect operator, according to\n      Codingguidelines .  \n   4. Using git -C instead of cd \n   5. Placing all commands in seperate lines. \n\nAlso, I have tested the scripts and set up travis CI[2].\n[1]https://lore.kernel.org/git/CAPig+cQpUu2UO-+jWn1nTaDykWnxwuEitzVB7PnW2SS_b7V8Hg@mail.gmail.com/\n[2]https://travis-ci.org/github/charvi-077/git/branches\n\n\ncharvi-077 (5):\n  t7101,t7102,t7201: modernize test formatting\n  t7102,t7201: remove unnecessary blank spaces in test body\n  t7102,t7201: remove whitespace after redirect operator\n  t7201: avoid using cd outside of subshells\n  t7201: place each command in its own line\n\n t/t7101-reset-empty-subdirs.sh |  66 ++++++++++-----------\n t/t7102-reset.sh               |  63 ++++++++------------\n t/t7201-co.sh                  | 102 +++++++++++++--------------------\n 3 files changed, 96 insertions(+), 135 deletions(-)\n\n-- \n2.29.0.rc1\n\n"},{"id":"407646","messageId":"20201015175709.20121-2-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201015175709.20121-1-charvi077@gmail.com","subject":"[PATCH 1/5][Outreachy] t7101,t7102,t7201: modernize test formatting","fromName":"charvi-077","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-15T17:57:05Z","receivedAt":"2020-10-15T17:58:10Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Some tests in this script are formatted using a very old style:\n        test_expect_success \\\n            'title' \\\n            'body line 1 &&\n            body line 2'\n\nUpdating the formatting to the modern style:\n        test_expect_success 'title' '\n            body line 1 &&\n            body line 2\n        '\nSigned-off-by: charvi-077 <charvi077@gmail.com>\n---\n t/t7101-reset-empty-subdirs.sh | 66 +++++++++++++++++-----------------\n t/t7102-reset.sh               | 24 +++++--------\n t/t7201-co.sh                  | 31 ++++++++--------\n 3 files changed, 56 insertions(+), 65 deletions(-)\n\ndiff --git a/t/t7101-reset-empty-subdirs.sh b/t/t7101-reset-empty-subdirs.sh\nindex 96e163f084..bfce05ac5d 100755\n--- a/t/t7101-reset-empty-subdirs.sh\n+++ b/t/t7101-reset-empty-subdirs.sh\n@@ -6,16 +6,15 @@\n test_description='git reset should cull empty subdirs'\n . ./test-lib.sh\n \n-test_expect_success \\\n-    'creating initial files' \\\n-    'mkdir path0 &&\n+test_expect_success 'creating initial files' '\n+     mkdir path0 &&\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-    'creating second files' \\\n-    'mkdir path1 &&\n+test_expect_success 'creating second files' '\n+     mkdir path1 &&\n      mkdir path1/path2 &&\n      cp \"$TEST_DIRECTORY\"/../COPYING path1/path2/COPYING &&\n      cp \"$TEST_DIRECTORY\"/../COPYING path1/COPYING &&\n@@ -25,39 +24,40 @@ test_expect_success \\\n      git add path1/COPYING &&\n      git add COPYING &&\n      git add path0/COPYING-TOO &&\n-     git commit -m change -a'\n+     git commit -m change -a\n+'\n \n-test_expect_success \\\n-    'resetting tree HEAD^' \\\n-    'git reset --hard HEAD^'\n+test_expect_success 'resetting tree HEAD^' '\n+     git reset --hard HEAD^\n+'\n \n-test_expect_success \\\n-    'checking initial files exist after rewind' \\\n-    'test -d path0 &&\n-     test -f path0/COPYING'\n+test_expect_success 'checking initial files exist after rewind' '\n+     test -d path0 &&\n+     test -f path0/COPYING\n+'\n \n-test_expect_success \\\n-    'checking lack of path1/path2/COPYING' \\\n-    '! test -f path1/path2/COPYING'\n+test_expect_success 'checking lack of path1/path2/COPYING' '\n+    ! test -f path1/path2/COPYING\n+'\n \n-test_expect_success \\\n-    'checking lack of path1/COPYING' \\\n-    '! test -f path1/COPYING'\n+test_expect_success 'checking lack of path1/COPYING' '\n+    ! test -f path1/COPYING\n+'\n \n-test_expect_success \\\n-    'checking lack of COPYING' \\\n-    '! test -f COPYING'\n+test_expect_success 'checking lack of COPYING' '\n+     ! test -f COPYING\n+'\n \n-test_expect_success \\\n-    'checking checking lack of path1/COPYING-TOO' \\\n-    '! test -f path0/COPYING-TOO'\n+test_expect_success 'checking checking lack of path1/COPYING-TOO' '\n+     ! test -f path0/COPYING-TOO\n+'\n \n-test_expect_success \\\n-    'checking lack of path1/path2' \\\n-    '! test -d path1/path2'\n+test_expect_success 'checking lack of path1/path2' '\n+     ! test -d path1/path2\n+'\n \n-test_expect_success \\\n-    'checking lack of path1' \\\n-    '! test -d path1'\n+test_expect_success 'checking lack of path1' '\n+     ! test -d path1\n+'\n \n test_done\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex 22161b3b2d..fe43f77513 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -107,8 +107,7 @@ test_expect_success 'reset --soft with unmerged index should fail' '\n \tgit rm --cached -- un\n '\n \n-test_expect_success \\\n-\t'giving paths with options different than --mixed should fail' '\n+test_expect_success 'giving paths with options different than --mixed should fail' '\n \ttest_must_fail git reset --soft -- first &&\n \ttest_must_fail git reset --hard -- first &&\n \ttest_must_fail git reset --soft HEAD^ -- first &&\n@@ -128,8 +127,7 @@ test_expect_success 'giving unrecognized options should fail' '\n \tcheck_changes $head5\n '\n \n-test_expect_success \\\n-\t'trying to do reset --soft with pending merge should fail' '\n+test_expect_success 'trying to do reset --soft with pending merge should fail' '\n \tgit branch branch1 &&\n \tgit branch branch2 &&\n \n@@ -152,8 +150,7 @@ test_expect_success \\\n \tcheck_changes $head5\n '\n \n-test_expect_success \\\n-\t'trying to do reset --soft with pending checkout merge should fail' '\n+test_expect_success 'trying to do reset --soft with pending checkout merge should fail' '\n \tgit branch branch3 &&\n \tgit branch branch4 &&\n \n@@ -175,8 +172,7 @@ test_expect_success \\\n \tcheck_changes $head5\n '\n \n-test_expect_success \\\n-\t'resetting to HEAD with no changes should succeed and do nothing' '\n+test_expect_success 'resetting to HEAD with no changes should succeed and do nothing' '\n \tgit reset --hard &&\n \t\tcheck_changes $head5 &&\n \tgit reset --hard HEAD &&\n@@ -226,8 +222,7 @@ secondfile:\n 2nd line 2nd file\n 3rd line 2nd file\n EOF\n-test_expect_success \\\n-\t'changing files and redo the last commit should succeed' '\n+test_expect_success 'changing files and redo the last commit should succeed' '\n \techo \"3rd line 2nd file\" >>secondfile &&\n \tgit commit -a -C ORIG_HEAD &&\n \thead4=$(git rev-parse --verify HEAD) &&\n@@ -245,8 +240,7 @@ first:\n second:\n 2nd file\n EOF\n-test_expect_success \\\n-\t'--hard reset should change the files and undo commits permanently' '\n+test_expect_success '--hard reset should change the files and undo commits permanently' '\n \tgit reset --hard HEAD~2 &&\n \tcheck_changes $head5p2 &&\n \ttest \"$(git rev-parse ORIG_HEAD)\" = \\\n@@ -284,8 +278,7 @@ secondfile:\n 1st line 2nd file\n 2nd line 2nd file\n EOF\n-test_expect_success \\\n-\t'redoing changes adding them without commit them should succeed' '\n+test_expect_success 'redoing changes adding them without commit them should succeed' '\n \tgit rm first &&\n \tgit mv second secondfile &&\n \n@@ -380,8 +373,7 @@ secondfile:\n 1st line 2nd file\n 2nd line 2nd file\n EOF\n-test_expect_success \\\n-\t'--hard reset to ORIG_HEAD should clear a fast-forward merge' '\n+test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge' '\n \tgit reset --hard HEAD^ &&\n \tcheck_changes $head5 &&\n \ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 4d62b9b00f..a800bda5e3 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -62,7 +62,7 @@ test_expect_success setup '\n \tgit checkout master\n '\n \n-test_expect_success \"checkout from non-existing branch\" '\n+test_expect_success 'checkout from non-existing branch' '\n \n \tgit checkout -b delete-me master &&\n \tgit update-ref -d --no-deref refs/heads/delete-me &&\n@@ -71,7 +71,7 @@ test_expect_success \"checkout from non-existing branch\" '\n \ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n '\n \n-test_expect_success \"checkout with dirty tree without -m\" '\n+test_expect_success 'checkout with dirty tree without -m' '\n \n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n \tif git checkout side\n@@ -84,7 +84,7 @@ test_expect_success \"checkout with dirty tree without -m\" '\n \n '\n \n-test_expect_success \"checkout with unrelated dirty tree without -m\" '\n+test_expect_success 'checkout with unrelated dirty tree without -m' '\n \n \tgit checkout -f master &&\n \tfill 0 1 2 3 4 5 6 7 8 >same &&\n@@ -95,7 +95,7 @@ test_expect_success \"checkout with unrelated dirty tree without -m\" '\n \ttest_cmp messages.expect messages\n '\n \n-test_expect_success \"checkout -m with dirty tree\" '\n+test_expect_success 'checkout -m with dirty tree' '\n \n \tgit checkout -f master &&\n \tgit clean -f &&\n@@ -120,7 +120,7 @@ test_expect_success \"checkout -m with dirty tree\" '\n \ttest_must_be_empty current.index\n '\n \n-test_expect_success \"checkout -m with dirty tree, renamed\" '\n+test_expect_success 'checkout -m with dirty tree, renamed' '\n \n \tgit checkout -f master && git clean -f &&\n \n@@ -388,22 +388,22 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \n '\n \n-test_expect_success \\\n-    'checkout w/--track sets up tracking' '\n+test_expect_success 'checkout w/--track sets up tracking' '\n     git config branch.autosetupmerge false &&\n     git checkout master &&\n     git checkout --track -b track1 &&\n     test \"$(git config branch.track1.remote)\" &&\n-    test \"$(git config branch.track1.merge)\"'\n+    test \"$(git config branch.track1.merge)\"\n+'\n \n-test_expect_success \\\n-    'checkout w/autosetupmerge=always sets up tracking' '\n+test_expect_success 'checkout w/autosetupmerge=always sets up tracking' '\n     test_when_finished git config branch.autosetupmerge false &&\n     git config branch.autosetupmerge always &&\n     git checkout master &&\n     git checkout -b track2 &&\n     test \"$(git config branch.track2.remote)\" &&\n-    test \"$(git config branch.track2.merge)\"'\n+    test \"$(git config branch.track2.merge)\"\n+'\n \n test_expect_success 'checkout w/--track from non-branch HEAD fails' '\n     git checkout master^0 &&\n@@ -435,8 +435,7 @@ test_expect_success 'detach a symbolic link HEAD' '\n     test \"z$(git rev-parse --verify refs/heads/master)\" = \"z$here\"\n '\n \n-test_expect_success \\\n-    'checkout with --track fakes a sensible -b <name>' '\n+test_expect_success 'checkout with --track fakes a sensible -b <name>' '\n     git config remote.origin.fetch \"+refs/heads/*:refs/remotes/origin/*\" &&\n     git update-ref refs/remotes/origin/koala/bear renamer &&\n \n@@ -457,9 +456,9 @@ test_expect_success \\\n     test \"$(git rev-parse HEAD)\" = \"$(git rev-parse renamer)\"\n '\n \n-test_expect_success \\\n-    'checkout with --track, but without -b, fails with too short tracked name' '\n-    test_must_fail git checkout --track renamer'\n+test_expect_success 'checkout with --track, but without -b, fails with too short tracked name' '\n+    test_must_fail git checkout --track renamer\n+'\n \n setup_conflicting_index () {\n \trm -f .git/index &&\n-- \n2.29.0.rc1\n\n"},{"id":"407647","messageId":"20201015175709.20121-3-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201015175709.20121-1-charvi077@gmail.com","subject":"[PATCH 2/5][Outreachy] t7102,t7201: remove unnecessary blank spaces in test body","fromName":"charvi-077","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-15T17:57:06Z","receivedAt":"2020-10-15T17:58:17Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Some tests use a deprecated style in which there are unnecessary blank lines after the opening quote of the test body and before the closing quote. So we should removed these unnecessary blank lines.\n\nSigned-off-by: charvi-077 <charvi077@gmail.com>\n---\n t/t7102-reset.sh |  9 ---------\n t/t7201-co.sh    | 25 -------------------------\n 2 files changed, 34 deletions(-)\n\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex fe43f77513..2b4cfb2c83 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -439,7 +439,6 @@ test_expect_success 'test --mixed <paths>' '\n '\n \n test_expect_success 'test resetting the index at give paths' '\n-\n \tmkdir sub &&\n \t>sub/file1 &&\n \t>sub/file2 &&\n@@ -452,7 +451,6 @@ test_expect_success 'test resetting the index at give paths' '\n \techo \"$U\" &&\n \ttest_must_fail git diff-index --cached --exit-code \"$T\" &&\n \ttest \"$T\" != \"$U\"\n-\n '\n \n test_expect_success 'resetting an unmodified path is a no-op' '\n@@ -490,7 +488,6 @@ test_expect_success 'resetting specific path that is unmerged' '\n '\n \n test_expect_success 'disambiguation (1)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\n@@ -499,11 +496,9 @@ test_expect_success 'disambiguation (1)' '\n \ttest -z \"$(git diff --cached --name-only)\" &&\n \ttest -f secondfile &&\n \ttest_must_be_empty secondfile\n-\n '\n \n test_expect_success 'disambiguation (2)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\n@@ -511,11 +506,9 @@ test_expect_success 'disambiguation (2)' '\n \ttest_must_fail git reset secondfile &&\n \ttest -n \"$(git diff --cached --name-only -- secondfile)\" &&\n \ttest ! -f secondfile\n-\n '\n \n test_expect_success 'disambiguation (3)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\n@@ -524,11 +517,9 @@ test_expect_success 'disambiguation (3)' '\n \ttest_must_fail git diff --quiet &&\n \ttest -z \"$(git diff --cached --name-only)\" &&\n \ttest ! -f secondfile\n-\n '\n \n test_expect_success 'disambiguation (4)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex a800bda5e3..b527f8009c 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -33,7 +33,6 @@ fill () {\n \n \n test_expect_success setup '\n-\n \tfill x y z > same &&\n \tfill 1 2 3 4 5 6 7 8 >one &&\n \tfill a b c d e >two &&\n@@ -63,7 +62,6 @@ test_expect_success setup '\n '\n \n test_expect_success 'checkout from non-existing branch' '\n-\n \tgit checkout -b delete-me master &&\n \tgit update-ref -d --no-deref refs/heads/delete-me &&\n \ttest refs/heads/delete-me = \"$(git symbolic-ref HEAD)\" &&\n@@ -72,7 +70,6 @@ test_expect_success 'checkout from non-existing branch' '\n '\n \n test_expect_success 'checkout with dirty tree without -m' '\n-\n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n \tif git checkout side\n \tthen\n@@ -81,11 +78,9 @@ test_expect_success 'checkout with dirty tree without -m' '\n \telse\n \t\techo \"happy - failed correctly\"\n \tfi\n-\n '\n \n test_expect_success 'checkout with unrelated dirty tree without -m' '\n-\n \tgit checkout -f master &&\n \tfill 0 1 2 3 4 5 6 7 8 >same &&\n \tcp same kept &&\n@@ -96,7 +91,6 @@ test_expect_success 'checkout with unrelated dirty tree without -m' '\n '\n \n test_expect_success 'checkout -m with dirty tree' '\n-\n \tgit checkout -f master &&\n \tgit clean -f &&\n \n@@ -121,7 +115,6 @@ test_expect_success 'checkout -m with dirty tree' '\n '\n \n test_expect_success 'checkout -m with dirty tree, renamed' '\n-\n \tgit checkout -f master && git clean -f &&\n \n \tfill 1 2 3 4 5 7 8 >one &&\n@@ -139,11 +132,9 @@ test_expect_success 'checkout -m with dirty tree, renamed' '\n \t! test -f one &&\n \tgit diff --cached >current &&\n \ttest_must_be_empty current\n-\n '\n \n test_expect_success 'checkout -m with merge conflict' '\n-\n \tgit checkout -f master && git clean -f &&\n \n \tfill 1 T 3 4 5 6 S 8 >one &&\n@@ -166,7 +157,6 @@ test_expect_success 'checkout -m with merge conflict' '\n '\n \n test_expect_success 'format of merge conflict from checkout -m' '\n-\n \tgit checkout -f master && git clean -f &&\n \n \tfill b d > two &&\n@@ -190,7 +180,6 @@ test_expect_success 'format of merge conflict from checkout -m' '\n '\n \n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n-\n \tgit checkout -f master && git reset --hard && git clean -f &&\n \n \tfill b d > two &&\n@@ -216,7 +205,6 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n '\n \n test_expect_success 'switch to another branch while carrying a deletion' '\n-\n \tgit checkout -f master && git reset --hard && git clean -f &&\n \tgit rm two &&\n \n@@ -228,7 +216,6 @@ test_expect_success 'switch to another branch while carrying a deletion' '\n '\n \n test_expect_success 'checkout to detach HEAD (with advice declined)' '\n-\n \tgit config advice.detachedHead false &&\n \trev=$(git rev-parse --short renamer^) &&\n \tgit checkout -f renamer && git clean -f &&\n@@ -267,7 +254,6 @@ test_expect_success 'checkout to detach HEAD' '\n '\n \n test_expect_success 'checkout to detach HEAD with branchname^' '\n-\n \tgit checkout -f master && git clean -f &&\n \tgit checkout renamer^ &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -283,7 +269,6 @@ test_expect_success 'checkout to detach HEAD with branchname^' '\n '\n \n test_expect_success 'checkout to detach HEAD with :/message' '\n-\n \tgit checkout -f master && git clean -f &&\n \tgit checkout \":/Initial\" &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -299,7 +284,6 @@ test_expect_success 'checkout to detach HEAD with :/message' '\n '\n \n test_expect_success 'checkout to detach HEAD with HEAD^0' '\n-\n \tgit checkout -f master && git clean -f &&\n \tgit checkout HEAD^0 &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -315,7 +299,6 @@ test_expect_success 'checkout to detach HEAD with HEAD^0' '\n '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n-\n \tgit tag both side &&\n \tgit branch both master &&\n \tgit reset --hard &&\n@@ -327,11 +310,9 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \ttest \"z$H\" = \"z$M\" &&\n \tname=$(git symbolic-ref HEAD 2>/dev/null) &&\n \ttest \"z$name\" = zrefs/heads/both\n-\n '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n-\n \tgit reset --hard &&\n \tgit checkout master &&\n \n@@ -351,11 +332,9 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \telse\n \t\t: happy\n \tfi\n-\n '\n \n test_expect_success 'switch branches while in subdirectory' '\n-\n \tgit reset --hard &&\n \tgit checkout master &&\n \n@@ -366,11 +345,9 @@ test_expect_success 'switch branches while in subdirectory' '\n \t) &&\n \t! test -f subs/one &&\n \trm -fr subs\n-\n '\n \n test_expect_success 'checkout specific path while in subdirectory' '\n-\n \tgit reset --hard &&\n \tgit checkout side &&\n \tmkdir subs &&\n@@ -385,7 +362,6 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \t\tgit checkout side -- bero\n \t) &&\n \ttest -f subs/bero\n-\n '\n \n test_expect_success 'checkout w/--track sets up tracking' '\n@@ -608,7 +584,6 @@ test_expect_success 'failing checkout -b should not break working tree' '\n \ttest $(git symbolic-ref HEAD) = refs/heads/master &&\n \tgit diff --exit-code &&\n \tgit diff --cached --exit-code\n-\n '\n \n test_expect_success 'switch out of non-branch' '\n-- \n2.29.0.rc1\n\n"},{"id":"407648","messageId":"20201015175709.20121-4-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201015175709.20121-1-charvi077@gmail.com","subject":"[PATCH 3/5][Outreachy] t7102,t7201: remove whitespace after redirect operator","fromName":"charvi-077","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-15T17:57:07Z","receivedAt":"2020-10-15T17:58:28Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"According to Documentation/CodingGuidelines, there should be no whitespace after redirect operators. So, we should remove these whitespaces after redirect operators.\n\nSigned-off-by: charvi-077 <charvi077@gmail.com>\n---\n t/t7102-reset.sh | 30 +++++++++++++++---------------\n t/t7201-co.sh    | 10 +++++-----\n 2 files changed, 20 insertions(+), 20 deletions(-)\n\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex 2b4cfb2c83..a8c96bf162 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -70,15 +70,15 @@ check_changes () {\n \n test_expect_success 'reset --hard message' '\n \thex=$(git log -1 --format=\"%h\") &&\n-\tgit reset --hard > .actual &&\n-\techo HEAD is now at $hex $(commit_msg) > .expected &&\n+\tgit reset --hard >.actual &&\n+\techo HEAD is now at $hex $(commit_msg) >.expected &&\n \ttest_i18ncmp .expected .actual\n '\n \n test_expect_success 'reset --hard message (ISO8859-1 logoutputencoding)' '\n \thex=$(git log -1 --format=\"%h\") &&\n-\tgit -c \"i18n.logOutputEncoding=$test_encoding\" reset --hard > .actual &&\n-\techo HEAD is now at $hex $(commit_msg $test_encoding) > .expected &&\n+\tgit -c \"i18n.logOutputEncoding=$test_encoding\" reset --hard >.actual &&\n+\techo HEAD is now at $hex $(commit_msg $test_encoding) >.expected &&\n \ttest_i18ncmp .expected .actual\n '\n \n@@ -387,25 +387,25 @@ test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge\n '\n \n test_expect_success 'test --mixed <paths>' '\n-\techo 1 > file1 &&\n-\techo 2 > file2 &&\n+\techo 1 >file1 &&\n+\techo 2 >file2 &&\n \tgit add file1 file2 &&\n \ttest_tick &&\n \tgit commit -m files &&\n \tbefore1=$(git rev-parse --short HEAD:file1) &&\n \tbefore2=$(git rev-parse --short HEAD:file2) &&\n \tgit rm file2 &&\n-\techo 3 > file3 &&\n-\techo 4 > file4 &&\n-\techo 5 > file1 &&\n+\techo 3 >file3 &&\n+\techo 4 >file4 &&\n+\techo 5 >file1 &&\n \tafter1=$(git rev-parse --short $(git hash-object file1)) &&\n \tafter4=$(git rev-parse --short $(git hash-object file4)) &&\n \tgit add file1 file3 file4 &&\n \tgit reset HEAD -- file1 file2 file3 &&\n \ttest_must_fail git diff --quiet &&\n-\tgit diff > output &&\n+\tgit diff >output &&\n \n-\tcat > expect <<-EOF &&\n+\tcat >expect <<-EOF &&\n \tdiff --git a/file1 b/file1\n \tindex $before1..$after1 100644\n \t--- a/file1\n@@ -423,9 +423,9 @@ test_expect_success 'test --mixed <paths>' '\n \tEOF\n \n \ttest_cmp expect output &&\n-\tgit diff --cached > output &&\n+\tgit diff --cached >output &&\n \n-\tcat > cached_expect <<-EOF &&\n+\tcat >cached_expect <<-EOF &&\n \tdiff --git a/file4 b/file4\n \tnew file mode 100644\n \tindex 0000000..$after4\n@@ -460,14 +460,14 @@ test_expect_success 'resetting an unmodified path is a no-op' '\n \tgit diff-index --cached --exit-code HEAD\n '\n \n-cat > expect << EOF\n+cat >expect << EOF\n Unstaged changes after reset:\n M\tfile2\n EOF\n \n test_expect_success '--mixed refreshes the index' '\n \techo 123 >> file2 &&\n-\tgit reset --mixed HEAD > output &&\n+\tgit reset --mixed HEAD >output &&\n \ttest_i18ncmp expect output\n '\n \ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex b527f8009c..74553f991b 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -33,7 +33,7 @@ fill () {\n \n \n test_expect_success setup '\n-\tfill x y z > same &&\n+\tfill x y z >same &&\n \tfill 1 2 3 4 5 6 7 8 >one &&\n \tfill a b c d e >two &&\n \tgit add same one two &&\n@@ -55,7 +55,7 @@ test_expect_success setup '\n \n \tgit checkout -b simple master &&\n \trm -f one &&\n-\tfill a c e > two &&\n+\tfill a c e >two &&\n \tgit commit -a -m \"Simple D one, M two\" &&\n \n \tgit checkout master\n@@ -95,7 +95,7 @@ test_expect_success 'checkout -m with dirty tree' '\n \tgit clean -f &&\n \n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n-\tgit checkout -m side > messages &&\n+\tgit checkout -m side >messages &&\n \n \ttest \"$(git symbolic-ref HEAD)\" = \"refs/heads/side\" &&\n \n@@ -159,7 +159,7 @@ test_expect_success 'checkout -m with merge conflict' '\n test_expect_success 'format of merge conflict from checkout -m' '\n \tgit checkout -f master && git clean -f &&\n \n-\tfill b d > two &&\n+\tfill b d >two &&\n \tgit checkout -m simple &&\n \n \tgit ls-files >current &&\n@@ -182,7 +182,7 @@ test_expect_success 'format of merge conflict from checkout -m' '\n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n \tgit checkout -f master && git reset --hard && git clean -f &&\n \n-\tfill b d > two &&\n+\tfill b d >two &&\n \tgit checkout --merge --conflict=diff3 simple &&\n \n \tcat <<-EOF >expect &&\n-- \n2.29.0.rc1\n\n"},{"id":"407649","messageId":"20201015175709.20121-5-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201015175709.20121-1-charvi077@gmail.com","subject":"[PATCH 4/5][Outreachy] t7201: avoid using cd outside of subshells","fromName":"charvi-077","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-15T17:57:08Z","receivedAt":"2020-10-15T17:58:31Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Avoid using `cd` outside of subshells since, if the test fails, there is no guarantee that the current working directory is the expected one, which may cause subsequent tests to run in the wrong directory.\n\nSigned-off-by: charvi-077 <charvi077@gmail.com>\n---\n t/t7201-co.sh | 10 ++--------\n 1 file changed, 2 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 74553f991b..5898182fd2 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -339,10 +339,7 @@ test_expect_success 'switch branches while in subdirectory' '\n \tgit checkout master &&\n \n \tmkdir subs &&\n-\t(\n-\t\tcd subs &&\n-\t\tgit checkout side\n-\t) &&\n+\tgit -C subs checkout side &&\n \t! test -f subs/one &&\n \trm -fr subs\n '\n@@ -357,10 +354,7 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \n \tgit checkout master &&\n \tmkdir -p subs &&\n-\t(\n-\t\tcd subs &&\n-\t\tgit checkout side -- bero\n-\t) &&\n+\tgit -C subs checkout side -- bero &&\n \ttest -f subs/bero\n '\n \n-- \n2.29.0.rc1\n\n"},{"id":"407650","messageId":"20201015175709.20121-6-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201015175709.20121-1-charvi077@gmail.com","subject":"[PATCH 5/5][Outreachy] t7201: place each command in its own line","fromName":"charvi-077","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-15T17:57:09Z","receivedAt":"2020-10-15T17:58:38Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Multiple commands on one line should be split across multiple lines.\n\nSigned-off-by: charvi-077 <charvi077@gmail.com>\n---\n t/t7201-co.sh | 26 ++++++++++++++++++--------\n 1 file changed, 18 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 5898182fd2..b36a93056f 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -157,7 +157,8 @@ test_expect_success 'checkout -m with merge conflict' '\n '\n \n test_expect_success 'format of merge conflict from checkout -m' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \n \tfill b d >two &&\n \tgit checkout -m simple &&\n@@ -180,7 +181,9 @@ test_expect_success 'format of merge conflict from checkout -m' '\n '\n \n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n-\tgit checkout -f master && git reset --hard && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit reset --hard &&\n+\tgit clean -f &&\n \n \tfill b d >two &&\n \tgit checkout --merge --conflict=diff3 simple &&\n@@ -205,7 +208,9 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n '\n \n test_expect_success 'switch to another branch while carrying a deletion' '\n-\tgit checkout -f master && git reset --hard && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit reset --hard &&\n+\tgit clean -f &&\n \tgit rm two &&\n \n \ttest_must_fail git checkout simple 2>errs &&\n@@ -218,7 +223,8 @@ test_expect_success 'switch to another branch while carrying a deletion' '\n test_expect_success 'checkout to detach HEAD (with advice declined)' '\n \tgit config advice.detachedHead false &&\n \trev=$(git rev-parse --short renamer^) &&\n-\tgit checkout -f renamer && git clean -f &&\n+\tgit checkout -f renamer &&\n+\tgit clean -f &&\n \tgit checkout renamer^ 2>messages &&\n \ttest_i18ngrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count = 1 messages &&\n@@ -237,7 +243,8 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '\n test_expect_success 'checkout to detach HEAD' '\n \tgit config advice.detachedHead true &&\n \trev=$(git rev-parse --short renamer^) &&\n-\tgit checkout -f renamer && git clean -f &&\n+\tgit checkout -f renamer &&\n+\tgit clean -f &&\n \tGIT_TEST_GETTEXT_POISON=false git checkout renamer^ 2>messages &&\n \tgrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count -gt 1 messages &&\n@@ -254,7 +261,8 @@ test_expect_success 'checkout to detach HEAD' '\n '\n \n test_expect_success 'checkout to detach HEAD with branchname^' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout renamer^ &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n@@ -269,7 +277,8 @@ test_expect_success 'checkout to detach HEAD with branchname^' '\n '\n \n test_expect_success 'checkout to detach HEAD with :/message' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout \":/Initial\" &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n@@ -284,7 +293,8 @@ test_expect_success 'checkout to detach HEAD with :/message' '\n '\n \n test_expect_success 'checkout to detach HEAD with HEAD^0' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout HEAD^0 &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n-- \n2.29.0.rc1\n\n"},{"id":"407714","messageId":"CAP8UFD1J8hpcfyzMKvqy67-bMZipzsUvR9f1cXxtPR9Co5hNRA@mail.gmail.com","threadId":"54430","inReplyTo":"20201015175709.20121-1-charvi077@gmail.com","subject":"Re: [PATCH 0/5][Outreachy] modernizing the test scripts","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2020-10-16T12:54:24Z","receivedAt":"2020-10-16T12:54:40Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Thu, Oct 15, 2020 at 7:57 PM charvi-077 <charvi077@gmail.com> wrote:\n>\n> This is my first patch series to the GIT mailing list. I followed the\n> link[1] and t7001 patches to modernize and clean up the test scripts.\n\nThanks for getting started contributing!\n\n> This patch series :\n>  -modernize the three test scripts : t7101, t7201 and t102.\n\ns/t102/t7102/\n\nOn https://git.github.io/Outreachy-21-Microprojects/ we say:\n\n\"Find one test script that needs some of the same changes and make them.\"\n\nSo working only one test script, for example only t7101, would have\nbeen better than working on 3 test scripts. Now that you started\nworking on 3 test scripts, it's ok to finish modernizing all these 3\ntest scripts though.\n\n>  - cleans up with 5 types of changes in all the three scripts.\n>    1. Converting the old old style test format to new one\n\ns/old old/old/\n\n>    2. Removing blankspaces in test bodies\n>    3. Removing whitespaces after the redirect operator, according to\n>       Codingguidelines .\n\ns/Codingguidelines/CodingGuidelines/\n\n>    4. Using git -C instead of cd\n>    5. Placing all commands in seperate lines.\n\ns/seperate/separate/\n\n> Also, I have tested the scripts and set up travis CI[2].\n\nNice!\n\nThanks,\nChristian.\n"},{"id":"407715","messageId":"CAP8UFD0BhN_e_HRd1NHvjxH6ipD59XVDV6WWUtT-b10L4VFBqw@mail.gmail.com","threadId":"54430","inReplyTo":"20201015175709.20121-2-charvi077@gmail.com","subject":"Re: [PATCH 1/5][Outreachy] t7101,t7102,t7201: modernize test formatting","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2020-10-16T13:07:03Z","receivedAt":"2020-10-16T13:07:21Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Thu, Oct 15, 2020 at 7:58 PM charvi-077 <charvi077@gmail.com> wrote:\n>\n> Some tests in this script are formatted using a very old style:\n\ns/this script/these scripts/\n\nas this patch is modifying more than one test script.\n\n>         test_expect_success \\\n>             'title' \\\n>             'body line 1 &&\n>             body line 2'\n>\n> Updating the formatting to the modern style:\n>         test_expect_success 'title' '\n>             body line 1 &&\n>             body line 2\n>         '\n> Signed-off-by: charvi-077 <charvi077@gmail.com>\n\nAs Junio already mentioned we request that contributors use their full\nreal name as the author name (which is by default the sender of the\nemail) and in the \"Signed-off-by: \"\n"},{"id":"407789","messageId":"20201017075455.9660-1-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201015175709.20121-1-charvi077@gmail.com","subject":"[PATCH v2 0/5][Outreachy] modernizing the test scripts","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-17T07:54:50Z","receivedAt":"2020-10-17T07:55:51Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Thanks to Junio and Christian for corrections required in previous patch series, I have updated them in this patch series. I have updated the author name and sign-offs on all the patches, and also corrected the mistakes in cover letter and commit message of patch. \n\nThis patch series :\n -modernize the three test scripts : t7101, t7201 and t7102.\n - cleans up with 5 types of changes in all the three scripts.\n   1. Converting the old style test format to new one\n   2. Removing blankspaces in test bodies\n   3. Removing whitespaces after the redirect operator, according to\n      CodingGuidelines \n   4. Using git -C instead of cd\n   5. Placing all commands in separate lines\n\n\nCharvi Mendiratta (5):\n  t7101,t7102,t7201: modernize test formatting\n  t7102,t7201: remove unnecessary blank spaces in test body\n  t7102,t7201: remove whitespace after redirect operator\n  t7201: avoid using cd outside of subshells\n  t7201: place each command in its own line\n\n t/t7101-reset-empty-subdirs.sh |  66 ++++++++++-----------\n t/t7102-reset.sh               |  63 ++++++++------------\n t/t7201-co.sh                  | 102 +++++++++++++--------------------\n 3 files changed, 96 insertions(+), 135 deletions(-)\n\n-- \n2.29.0.rc1\n\n"},{"id":"407790","messageId":"20201017075455.9660-2-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201017075455.9660-1-charvi077@gmail.com","subject":"[PATCH v2 1/5][Outreachy] t7101,t7102,t7201: modernize test formatting","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-17T07:54:51Z","receivedAt":"2020-10-17T07:56:02Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Some tests in these scripts are formatted using a very old style:\n        test_expect_success \\\n            'title' \\\n            'body line 1 &&\n            body line 2'\n\nUpdating the formatting to the modern style:\n        test_expect_success 'title' '\n            body line 1 &&\n            body line 2\n        '\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7101-reset-empty-subdirs.sh | 66 +++++++++++++++++-----------------\n t/t7102-reset.sh               | 24 +++++--------\n t/t7201-co.sh                  | 31 ++++++++--------\n 3 files changed, 56 insertions(+), 65 deletions(-)\n\ndiff --git a/t/t7101-reset-empty-subdirs.sh b/t/t7101-reset-empty-subdirs.sh\nindex 96e163f084..bfce05ac5d 100755\n--- a/t/t7101-reset-empty-subdirs.sh\n+++ b/t/t7101-reset-empty-subdirs.sh\n@@ -6,16 +6,15 @@\n test_description='git reset should cull empty subdirs'\n . ./test-lib.sh\n \n-test_expect_success \\\n-    'creating initial files' \\\n-    'mkdir path0 &&\n+test_expect_success 'creating initial files' '\n+     mkdir path0 &&\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-    'creating second files' \\\n-    'mkdir path1 &&\n+test_expect_success 'creating second files' '\n+     mkdir path1 &&\n      mkdir path1/path2 &&\n      cp \"$TEST_DIRECTORY\"/../COPYING path1/path2/COPYING &&\n      cp \"$TEST_DIRECTORY\"/../COPYING path1/COPYING &&\n@@ -25,39 +24,40 @@ test_expect_success \\\n      git add path1/COPYING &&\n      git add COPYING &&\n      git add path0/COPYING-TOO &&\n-     git commit -m change -a'\n+     git commit -m change -a\n+'\n \n-test_expect_success \\\n-    'resetting tree HEAD^' \\\n-    'git reset --hard HEAD^'\n+test_expect_success 'resetting tree HEAD^' '\n+     git reset --hard HEAD^\n+'\n \n-test_expect_success \\\n-    'checking initial files exist after rewind' \\\n-    'test -d path0 &&\n-     test -f path0/COPYING'\n+test_expect_success 'checking initial files exist after rewind' '\n+     test -d path0 &&\n+     test -f path0/COPYING\n+'\n \n-test_expect_success \\\n-    'checking lack of path1/path2/COPYING' \\\n-    '! test -f path1/path2/COPYING'\n+test_expect_success 'checking lack of path1/path2/COPYING' '\n+    ! test -f path1/path2/COPYING\n+'\n \n-test_expect_success \\\n-    'checking lack of path1/COPYING' \\\n-    '! test -f path1/COPYING'\n+test_expect_success 'checking lack of path1/COPYING' '\n+    ! test -f path1/COPYING\n+'\n \n-test_expect_success \\\n-    'checking lack of COPYING' \\\n-    '! test -f COPYING'\n+test_expect_success 'checking lack of COPYING' '\n+     ! test -f COPYING\n+'\n \n-test_expect_success \\\n-    'checking checking lack of path1/COPYING-TOO' \\\n-    '! test -f path0/COPYING-TOO'\n+test_expect_success 'checking checking lack of path1/COPYING-TOO' '\n+     ! test -f path0/COPYING-TOO\n+'\n \n-test_expect_success \\\n-    'checking lack of path1/path2' \\\n-    '! test -d path1/path2'\n+test_expect_success 'checking lack of path1/path2' '\n+     ! test -d path1/path2\n+'\n \n-test_expect_success \\\n-    'checking lack of path1' \\\n-    '! test -d path1'\n+test_expect_success 'checking lack of path1' '\n+     ! test -d path1\n+'\n \n test_done\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex 22161b3b2d..fe43f77513 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -107,8 +107,7 @@ test_expect_success 'reset --soft with unmerged index should fail' '\n \tgit rm --cached -- un\n '\n \n-test_expect_success \\\n-\t'giving paths with options different than --mixed should fail' '\n+test_expect_success 'giving paths with options different than --mixed should fail' '\n \ttest_must_fail git reset --soft -- first &&\n \ttest_must_fail git reset --hard -- first &&\n \ttest_must_fail git reset --soft HEAD^ -- first &&\n@@ -128,8 +127,7 @@ test_expect_success 'giving unrecognized options should fail' '\n \tcheck_changes $head5\n '\n \n-test_expect_success \\\n-\t'trying to do reset --soft with pending merge should fail' '\n+test_expect_success 'trying to do reset --soft with pending merge should fail' '\n \tgit branch branch1 &&\n \tgit branch branch2 &&\n \n@@ -152,8 +150,7 @@ test_expect_success \\\n \tcheck_changes $head5\n '\n \n-test_expect_success \\\n-\t'trying to do reset --soft with pending checkout merge should fail' '\n+test_expect_success 'trying to do reset --soft with pending checkout merge should fail' '\n \tgit branch branch3 &&\n \tgit branch branch4 &&\n \n@@ -175,8 +172,7 @@ test_expect_success \\\n \tcheck_changes $head5\n '\n \n-test_expect_success \\\n-\t'resetting to HEAD with no changes should succeed and do nothing' '\n+test_expect_success 'resetting to HEAD with no changes should succeed and do nothing' '\n \tgit reset --hard &&\n \t\tcheck_changes $head5 &&\n \tgit reset --hard HEAD &&\n@@ -226,8 +222,7 @@ secondfile:\n 2nd line 2nd file\n 3rd line 2nd file\n EOF\n-test_expect_success \\\n-\t'changing files and redo the last commit should succeed' '\n+test_expect_success 'changing files and redo the last commit should succeed' '\n \techo \"3rd line 2nd file\" >>secondfile &&\n \tgit commit -a -C ORIG_HEAD &&\n \thead4=$(git rev-parse --verify HEAD) &&\n@@ -245,8 +240,7 @@ first:\n second:\n 2nd file\n EOF\n-test_expect_success \\\n-\t'--hard reset should change the files and undo commits permanently' '\n+test_expect_success '--hard reset should change the files and undo commits permanently' '\n \tgit reset --hard HEAD~2 &&\n \tcheck_changes $head5p2 &&\n \ttest \"$(git rev-parse ORIG_HEAD)\" = \\\n@@ -284,8 +278,7 @@ secondfile:\n 1st line 2nd file\n 2nd line 2nd file\n EOF\n-test_expect_success \\\n-\t'redoing changes adding them without commit them should succeed' '\n+test_expect_success 'redoing changes adding them without commit them should succeed' '\n \tgit rm first &&\n \tgit mv second secondfile &&\n \n@@ -380,8 +373,7 @@ secondfile:\n 1st line 2nd file\n 2nd line 2nd file\n EOF\n-test_expect_success \\\n-\t'--hard reset to ORIG_HEAD should clear a fast-forward merge' '\n+test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge' '\n \tgit reset --hard HEAD^ &&\n \tcheck_changes $head5 &&\n \ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 4d62b9b00f..a800bda5e3 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -62,7 +62,7 @@ test_expect_success setup '\n \tgit checkout master\n '\n \n-test_expect_success \"checkout from non-existing branch\" '\n+test_expect_success 'checkout from non-existing branch' '\n \n \tgit checkout -b delete-me master &&\n \tgit update-ref -d --no-deref refs/heads/delete-me &&\n@@ -71,7 +71,7 @@ test_expect_success \"checkout from non-existing branch\" '\n \ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n '\n \n-test_expect_success \"checkout with dirty tree without -m\" '\n+test_expect_success 'checkout with dirty tree without -m' '\n \n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n \tif git checkout side\n@@ -84,7 +84,7 @@ test_expect_success \"checkout with dirty tree without -m\" '\n \n '\n \n-test_expect_success \"checkout with unrelated dirty tree without -m\" '\n+test_expect_success 'checkout with unrelated dirty tree without -m' '\n \n \tgit checkout -f master &&\n \tfill 0 1 2 3 4 5 6 7 8 >same &&\n@@ -95,7 +95,7 @@ test_expect_success \"checkout with unrelated dirty tree without -m\" '\n \ttest_cmp messages.expect messages\n '\n \n-test_expect_success \"checkout -m with dirty tree\" '\n+test_expect_success 'checkout -m with dirty tree' '\n \n \tgit checkout -f master &&\n \tgit clean -f &&\n@@ -120,7 +120,7 @@ test_expect_success \"checkout -m with dirty tree\" '\n \ttest_must_be_empty current.index\n '\n \n-test_expect_success \"checkout -m with dirty tree, renamed\" '\n+test_expect_success 'checkout -m with dirty tree, renamed' '\n \n \tgit checkout -f master && git clean -f &&\n \n@@ -388,22 +388,22 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \n '\n \n-test_expect_success \\\n-    'checkout w/--track sets up tracking' '\n+test_expect_success 'checkout w/--track sets up tracking' '\n     git config branch.autosetupmerge false &&\n     git checkout master &&\n     git checkout --track -b track1 &&\n     test \"$(git config branch.track1.remote)\" &&\n-    test \"$(git config branch.track1.merge)\"'\n+    test \"$(git config branch.track1.merge)\"\n+'\n \n-test_expect_success \\\n-    'checkout w/autosetupmerge=always sets up tracking' '\n+test_expect_success 'checkout w/autosetupmerge=always sets up tracking' '\n     test_when_finished git config branch.autosetupmerge false &&\n     git config branch.autosetupmerge always &&\n     git checkout master &&\n     git checkout -b track2 &&\n     test \"$(git config branch.track2.remote)\" &&\n-    test \"$(git config branch.track2.merge)\"'\n+    test \"$(git config branch.track2.merge)\"\n+'\n \n test_expect_success 'checkout w/--track from non-branch HEAD fails' '\n     git checkout master^0 &&\n@@ -435,8 +435,7 @@ test_expect_success 'detach a symbolic link HEAD' '\n     test \"z$(git rev-parse --verify refs/heads/master)\" = \"z$here\"\n '\n \n-test_expect_success \\\n-    'checkout with --track fakes a sensible -b <name>' '\n+test_expect_success 'checkout with --track fakes a sensible -b <name>' '\n     git config remote.origin.fetch \"+refs/heads/*:refs/remotes/origin/*\" &&\n     git update-ref refs/remotes/origin/koala/bear renamer &&\n \n@@ -457,9 +456,9 @@ test_expect_success \\\n     test \"$(git rev-parse HEAD)\" = \"$(git rev-parse renamer)\"\n '\n \n-test_expect_success \\\n-    'checkout with --track, but without -b, fails with too short tracked name' '\n-    test_must_fail git checkout --track renamer'\n+test_expect_success 'checkout with --track, but without -b, fails with too short tracked name' '\n+    test_must_fail git checkout --track renamer\n+'\n \n setup_conflicting_index () {\n \trm -f .git/index &&\n-- \n2.29.0.rc1\n\n"},{"id":"407791","messageId":"20201017075455.9660-3-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201017075455.9660-1-charvi077@gmail.com","subject":"[PATCH v2 2/5][Outreachy] t7102,t7201: remove unnecessary blank spaces in test body","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-17T07:54:52Z","receivedAt":"2020-10-17T07:56:05Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Some tests use a deprecated style in which there are unnecessary blank lines after the opening quote of the test body and before the closing quote. So we should remove these unnecessary blank lines.\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7102-reset.sh |  9 ---------\n t/t7201-co.sh    | 25 -------------------------\n 2 files changed, 34 deletions(-)\n\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex fe43f77513..2b4cfb2c83 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -439,7 +439,6 @@ test_expect_success 'test --mixed <paths>' '\n '\n \n test_expect_success 'test resetting the index at give paths' '\n-\n \tmkdir sub &&\n \t>sub/file1 &&\n \t>sub/file2 &&\n@@ -452,7 +451,6 @@ test_expect_success 'test resetting the index at give paths' '\n \techo \"$U\" &&\n \ttest_must_fail git diff-index --cached --exit-code \"$T\" &&\n \ttest \"$T\" != \"$U\"\n-\n '\n \n test_expect_success 'resetting an unmodified path is a no-op' '\n@@ -490,7 +488,6 @@ test_expect_success 'resetting specific path that is unmerged' '\n '\n \n test_expect_success 'disambiguation (1)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\n@@ -499,11 +496,9 @@ test_expect_success 'disambiguation (1)' '\n \ttest -z \"$(git diff --cached --name-only)\" &&\n \ttest -f secondfile &&\n \ttest_must_be_empty secondfile\n-\n '\n \n test_expect_success 'disambiguation (2)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\n@@ -511,11 +506,9 @@ test_expect_success 'disambiguation (2)' '\n \ttest_must_fail git reset secondfile &&\n \ttest -n \"$(git diff --cached --name-only -- secondfile)\" &&\n \ttest ! -f secondfile\n-\n '\n \n test_expect_success 'disambiguation (3)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\n@@ -524,11 +517,9 @@ test_expect_success 'disambiguation (3)' '\n \ttest_must_fail git diff --quiet &&\n \ttest -z \"$(git diff --cached --name-only)\" &&\n \ttest ! -f secondfile\n-\n '\n \n test_expect_success 'disambiguation (4)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex a800bda5e3..b527f8009c 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -33,7 +33,6 @@ fill () {\n \n \n test_expect_success setup '\n-\n \tfill x y z > same &&\n \tfill 1 2 3 4 5 6 7 8 >one &&\n \tfill a b c d e >two &&\n@@ -63,7 +62,6 @@ test_expect_success setup '\n '\n \n test_expect_success 'checkout from non-existing branch' '\n-\n \tgit checkout -b delete-me master &&\n \tgit update-ref -d --no-deref refs/heads/delete-me &&\n \ttest refs/heads/delete-me = \"$(git symbolic-ref HEAD)\" &&\n@@ -72,7 +70,6 @@ test_expect_success 'checkout from non-existing branch' '\n '\n \n test_expect_success 'checkout with dirty tree without -m' '\n-\n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n \tif git checkout side\n \tthen\n@@ -81,11 +78,9 @@ test_expect_success 'checkout with dirty tree without -m' '\n \telse\n \t\techo \"happy - failed correctly\"\n \tfi\n-\n '\n \n test_expect_success 'checkout with unrelated dirty tree without -m' '\n-\n \tgit checkout -f master &&\n \tfill 0 1 2 3 4 5 6 7 8 >same &&\n \tcp same kept &&\n@@ -96,7 +91,6 @@ test_expect_success 'checkout with unrelated dirty tree without -m' '\n '\n \n test_expect_success 'checkout -m with dirty tree' '\n-\n \tgit checkout -f master &&\n \tgit clean -f &&\n \n@@ -121,7 +115,6 @@ test_expect_success 'checkout -m with dirty tree' '\n '\n \n test_expect_success 'checkout -m with dirty tree, renamed' '\n-\n \tgit checkout -f master && git clean -f &&\n \n \tfill 1 2 3 4 5 7 8 >one &&\n@@ -139,11 +132,9 @@ test_expect_success 'checkout -m with dirty tree, renamed' '\n \t! test -f one &&\n \tgit diff --cached >current &&\n \ttest_must_be_empty current\n-\n '\n \n test_expect_success 'checkout -m with merge conflict' '\n-\n \tgit checkout -f master && git clean -f &&\n \n \tfill 1 T 3 4 5 6 S 8 >one &&\n@@ -166,7 +157,6 @@ test_expect_success 'checkout -m with merge conflict' '\n '\n \n test_expect_success 'format of merge conflict from checkout -m' '\n-\n \tgit checkout -f master && git clean -f &&\n \n \tfill b d > two &&\n@@ -190,7 +180,6 @@ test_expect_success 'format of merge conflict from checkout -m' '\n '\n \n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n-\n \tgit checkout -f master && git reset --hard && git clean -f &&\n \n \tfill b d > two &&\n@@ -216,7 +205,6 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n '\n \n test_expect_success 'switch to another branch while carrying a deletion' '\n-\n \tgit checkout -f master && git reset --hard && git clean -f &&\n \tgit rm two &&\n \n@@ -228,7 +216,6 @@ test_expect_success 'switch to another branch while carrying a deletion' '\n '\n \n test_expect_success 'checkout to detach HEAD (with advice declined)' '\n-\n \tgit config advice.detachedHead false &&\n \trev=$(git rev-parse --short renamer^) &&\n \tgit checkout -f renamer && git clean -f &&\n@@ -267,7 +254,6 @@ test_expect_success 'checkout to detach HEAD' '\n '\n \n test_expect_success 'checkout to detach HEAD with branchname^' '\n-\n \tgit checkout -f master && git clean -f &&\n \tgit checkout renamer^ &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -283,7 +269,6 @@ test_expect_success 'checkout to detach HEAD with branchname^' '\n '\n \n test_expect_success 'checkout to detach HEAD with :/message' '\n-\n \tgit checkout -f master && git clean -f &&\n \tgit checkout \":/Initial\" &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -299,7 +284,6 @@ test_expect_success 'checkout to detach HEAD with :/message' '\n '\n \n test_expect_success 'checkout to detach HEAD with HEAD^0' '\n-\n \tgit checkout -f master && git clean -f &&\n \tgit checkout HEAD^0 &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -315,7 +299,6 @@ test_expect_success 'checkout to detach HEAD with HEAD^0' '\n '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n-\n \tgit tag both side &&\n \tgit branch both master &&\n \tgit reset --hard &&\n@@ -327,11 +310,9 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \ttest \"z$H\" = \"z$M\" &&\n \tname=$(git symbolic-ref HEAD 2>/dev/null) &&\n \ttest \"z$name\" = zrefs/heads/both\n-\n '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n-\n \tgit reset --hard &&\n \tgit checkout master &&\n \n@@ -351,11 +332,9 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \telse\n \t\t: happy\n \tfi\n-\n '\n \n test_expect_success 'switch branches while in subdirectory' '\n-\n \tgit reset --hard &&\n \tgit checkout master &&\n \n@@ -366,11 +345,9 @@ test_expect_success 'switch branches while in subdirectory' '\n \t) &&\n \t! test -f subs/one &&\n \trm -fr subs\n-\n '\n \n test_expect_success 'checkout specific path while in subdirectory' '\n-\n \tgit reset --hard &&\n \tgit checkout side &&\n \tmkdir subs &&\n@@ -385,7 +362,6 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \t\tgit checkout side -- bero\n \t) &&\n \ttest -f subs/bero\n-\n '\n \n test_expect_success 'checkout w/--track sets up tracking' '\n@@ -608,7 +584,6 @@ test_expect_success 'failing checkout -b should not break working tree' '\n \ttest $(git symbolic-ref HEAD) = refs/heads/master &&\n \tgit diff --exit-code &&\n \tgit diff --cached --exit-code\n-\n '\n \n test_expect_success 'switch out of non-branch' '\n-- \n2.29.0.rc1\n\n"},{"id":"407792","messageId":"20201017075455.9660-4-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201017075455.9660-1-charvi077@gmail.com","subject":"[PATCH v2 3/5][Outreachy] t7102,t7201: remove whitespace after redirect operator","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-17T07:54:53Z","receivedAt":"2020-10-17T07:56:08Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"According to Documentation/CodingGuidelines, there should be no whitespace after redirect operators. So, we should remove these whitespaces after redirect operators.\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7102-reset.sh | 30 +++++++++++++++---------------\n t/t7201-co.sh    | 10 +++++-----\n 2 files changed, 20 insertions(+), 20 deletions(-)\n\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex 2b4cfb2c83..a8c96bf162 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -70,15 +70,15 @@ check_changes () {\n \n test_expect_success 'reset --hard message' '\n \thex=$(git log -1 --format=\"%h\") &&\n-\tgit reset --hard > .actual &&\n-\techo HEAD is now at $hex $(commit_msg) > .expected &&\n+\tgit reset --hard >.actual &&\n+\techo HEAD is now at $hex $(commit_msg) >.expected &&\n \ttest_i18ncmp .expected .actual\n '\n \n test_expect_success 'reset --hard message (ISO8859-1 logoutputencoding)' '\n \thex=$(git log -1 --format=\"%h\") &&\n-\tgit -c \"i18n.logOutputEncoding=$test_encoding\" reset --hard > .actual &&\n-\techo HEAD is now at $hex $(commit_msg $test_encoding) > .expected &&\n+\tgit -c \"i18n.logOutputEncoding=$test_encoding\" reset --hard >.actual &&\n+\techo HEAD is now at $hex $(commit_msg $test_encoding) >.expected &&\n \ttest_i18ncmp .expected .actual\n '\n \n@@ -387,25 +387,25 @@ test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge\n '\n \n test_expect_success 'test --mixed <paths>' '\n-\techo 1 > file1 &&\n-\techo 2 > file2 &&\n+\techo 1 >file1 &&\n+\techo 2 >file2 &&\n \tgit add file1 file2 &&\n \ttest_tick &&\n \tgit commit -m files &&\n \tbefore1=$(git rev-parse --short HEAD:file1) &&\n \tbefore2=$(git rev-parse --short HEAD:file2) &&\n \tgit rm file2 &&\n-\techo 3 > file3 &&\n-\techo 4 > file4 &&\n-\techo 5 > file1 &&\n+\techo 3 >file3 &&\n+\techo 4 >file4 &&\n+\techo 5 >file1 &&\n \tafter1=$(git rev-parse --short $(git hash-object file1)) &&\n \tafter4=$(git rev-parse --short $(git hash-object file4)) &&\n \tgit add file1 file3 file4 &&\n \tgit reset HEAD -- file1 file2 file3 &&\n \ttest_must_fail git diff --quiet &&\n-\tgit diff > output &&\n+\tgit diff >output &&\n \n-\tcat > expect <<-EOF &&\n+\tcat >expect <<-EOF &&\n \tdiff --git a/file1 b/file1\n \tindex $before1..$after1 100644\n \t--- a/file1\n@@ -423,9 +423,9 @@ test_expect_success 'test --mixed <paths>' '\n \tEOF\n \n \ttest_cmp expect output &&\n-\tgit diff --cached > output &&\n+\tgit diff --cached >output &&\n \n-\tcat > cached_expect <<-EOF &&\n+\tcat >cached_expect <<-EOF &&\n \tdiff --git a/file4 b/file4\n \tnew file mode 100644\n \tindex 0000000..$after4\n@@ -460,14 +460,14 @@ test_expect_success 'resetting an unmodified path is a no-op' '\n \tgit diff-index --cached --exit-code HEAD\n '\n \n-cat > expect << EOF\n+cat >expect << EOF\n Unstaged changes after reset:\n M\tfile2\n EOF\n \n test_expect_success '--mixed refreshes the index' '\n \techo 123 >> file2 &&\n-\tgit reset --mixed HEAD > output &&\n+\tgit reset --mixed HEAD >output &&\n \ttest_i18ncmp expect output\n '\n \ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex b527f8009c..74553f991b 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -33,7 +33,7 @@ fill () {\n \n \n test_expect_success setup '\n-\tfill x y z > same &&\n+\tfill x y z >same &&\n \tfill 1 2 3 4 5 6 7 8 >one &&\n \tfill a b c d e >two &&\n \tgit add same one two &&\n@@ -55,7 +55,7 @@ test_expect_success setup '\n \n \tgit checkout -b simple master &&\n \trm -f one &&\n-\tfill a c e > two &&\n+\tfill a c e >two &&\n \tgit commit -a -m \"Simple D one, M two\" &&\n \n \tgit checkout master\n@@ -95,7 +95,7 @@ test_expect_success 'checkout -m with dirty tree' '\n \tgit clean -f &&\n \n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n-\tgit checkout -m side > messages &&\n+\tgit checkout -m side >messages &&\n \n \ttest \"$(git symbolic-ref HEAD)\" = \"refs/heads/side\" &&\n \n@@ -159,7 +159,7 @@ test_expect_success 'checkout -m with merge conflict' '\n test_expect_success 'format of merge conflict from checkout -m' '\n \tgit checkout -f master && git clean -f &&\n \n-\tfill b d > two &&\n+\tfill b d >two &&\n \tgit checkout -m simple &&\n \n \tgit ls-files >current &&\n@@ -182,7 +182,7 @@ test_expect_success 'format of merge conflict from checkout -m' '\n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n \tgit checkout -f master && git reset --hard && git clean -f &&\n \n-\tfill b d > two &&\n+\tfill b d >two &&\n \tgit checkout --merge --conflict=diff3 simple &&\n \n \tcat <<-EOF >expect &&\n-- \n2.29.0.rc1\n\n"},{"id":"407793","messageId":"20201017075455.9660-5-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201017075455.9660-1-charvi077@gmail.com","subject":"[PATCH v2 4/5][Outreachy] t7201: avoid using cd outside of subshells","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-17T07:54:54Z","receivedAt":"2020-10-17T07:56:14Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Avoid using `cd` outside of subshells since, if the test fails, there is no guarantee that the current working directory is the expected one, which may cause subsequent tests to run in the wrong directory.\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7201-co.sh | 10 ++--------\n 1 file changed, 2 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 74553f991b..5898182fd2 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -339,10 +339,7 @@ test_expect_success 'switch branches while in subdirectory' '\n \tgit checkout master &&\n \n \tmkdir subs &&\n-\t(\n-\t\tcd subs &&\n-\t\tgit checkout side\n-\t) &&\n+\tgit -C subs checkout side &&\n \t! test -f subs/one &&\n \trm -fr subs\n '\n@@ -357,10 +354,7 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \n \tgit checkout master &&\n \tmkdir -p subs &&\n-\t(\n-\t\tcd subs &&\n-\t\tgit checkout side -- bero\n-\t) &&\n+\tgit -C subs checkout side -- bero &&\n \ttest -f subs/bero\n '\n \n-- \n2.29.0.rc1\n\n"},{"id":"407794","messageId":"20201017075455.9660-6-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201017075455.9660-1-charvi077@gmail.com","subject":"[PATCH v2 5/5][Outreachy] t7201: place each command in its own line","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-17T07:54:55Z","receivedAt":"2020-10-17T07:56:21Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Multiple commands on one line should be split across multiple lines.\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7201-co.sh | 26 ++++++++++++++++++--------\n 1 file changed, 18 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 5898182fd2..b36a93056f 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -157,7 +157,8 @@ test_expect_success 'checkout -m with merge conflict' '\n '\n \n test_expect_success 'format of merge conflict from checkout -m' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \n \tfill b d >two &&\n \tgit checkout -m simple &&\n@@ -180,7 +181,9 @@ test_expect_success 'format of merge conflict from checkout -m' '\n '\n \n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n-\tgit checkout -f master && git reset --hard && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit reset --hard &&\n+\tgit clean -f &&\n \n \tfill b d >two &&\n \tgit checkout --merge --conflict=diff3 simple &&\n@@ -205,7 +208,9 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n '\n \n test_expect_success 'switch to another branch while carrying a deletion' '\n-\tgit checkout -f master && git reset --hard && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit reset --hard &&\n+\tgit clean -f &&\n \tgit rm two &&\n \n \ttest_must_fail git checkout simple 2>errs &&\n@@ -218,7 +223,8 @@ test_expect_success 'switch to another branch while carrying a deletion' '\n test_expect_success 'checkout to detach HEAD (with advice declined)' '\n \tgit config advice.detachedHead false &&\n \trev=$(git rev-parse --short renamer^) &&\n-\tgit checkout -f renamer && git clean -f &&\n+\tgit checkout -f renamer &&\n+\tgit clean -f &&\n \tgit checkout renamer^ 2>messages &&\n \ttest_i18ngrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count = 1 messages &&\n@@ -237,7 +243,8 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '\n test_expect_success 'checkout to detach HEAD' '\n \tgit config advice.detachedHead true &&\n \trev=$(git rev-parse --short renamer^) &&\n-\tgit checkout -f renamer && git clean -f &&\n+\tgit checkout -f renamer &&\n+\tgit clean -f &&\n \tGIT_TEST_GETTEXT_POISON=false git checkout renamer^ 2>messages &&\n \tgrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count -gt 1 messages &&\n@@ -254,7 +261,8 @@ test_expect_success 'checkout to detach HEAD' '\n '\n \n test_expect_success 'checkout to detach HEAD with branchname^' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout renamer^ &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n@@ -269,7 +277,8 @@ test_expect_success 'checkout to detach HEAD with branchname^' '\n '\n \n test_expect_success 'checkout to detach HEAD with :/message' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout \":/Initial\" &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n@@ -284,7 +293,8 @@ test_expect_success 'checkout to detach HEAD with :/message' '\n '\n \n test_expect_success 'checkout to detach HEAD with HEAD^0' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout HEAD^0 &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n-- \n2.29.0.rc1\n\n"},{"id":"407796","messageId":"CAPSFM5dL4KvRcXO3N+doQdPx=WtUKzcoqCxEAVqfsKJFc+YqGw@mail.gmail.com","threadId":"54430","inReplyTo":"CAP8UFD1J8hpcfyzMKvqy67-bMZipzsUvR9f1cXxtPR9Co5hNRA@mail.gmail.com","subject":"Re: [PATCH 0/5][Outreachy] modernizing the test scripts","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-17T08:27:32Z","receivedAt":"2020-10-17T08:27:46Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"On Fri, 16 Oct 2020 at 18:24, Christian Couder\n<christian.couder@gmail.com> wrote:\n\nThank you Christian, I have sent the new updated patch series .\n>\n> On Thu, Oct 15, 2020 at 7:57 PM charvi-077 <charvi077@gmail.com> wrote:\n> >\n> > This is my first patch series to the GIT mailing list. I followed the\n> > link[1] and t7001 patches to modernize and clean up the test scripts.\n>\n> Thanks for getting started contributing!\n>\n> > This patch series :\n> >  -modernize the three test scripts : t7101, t7201 and t102.\n>\n> s/t102/t7102/\n>\n> On https://git.github.io/Outreachy-21-Microprojects/ we say:\n>\n> \"Find one test script that needs some of the same changes and make them.\"\n>\n> So working only one test script, for example only t7101, would have\n> been better than working on 3 test scripts. Now that you started\n> working on 3 test scripts, it's ok to finish modernizing all these 3\n> test scripts though.\n>\nYes, I agree this but t7101 has very minor changes required that I\nhave completed so I switched to another one simultaneously . But in\nfuture I will make sure to follow this practise . Also, till now I\nhave done majority of the changes as mentioned in the link in all the\nthree scripts and will try to do more and complete it .\n\n> >  - cleans up with 5 types of changes in all the three scripts.\n> >    1. Converting the old old style test format to new one\n>\n> s/old old/old/\n>\n> >    2. Removing blankspaces in test bodies\n> >    3. Removing whitespaces after the redirect operator, according to\n> >       Codingguidelines .\n>\n> s/Codingguidelines/CodingGuidelines/\n>\n> >    4. Using git -C instead of cd\n> >    5. Placing all commands in seperate lines.\n>\n> s/seperate/separate/\n>\n> > Also, I have tested the scripts and set up travis CI[2].\n>\n> Nice!\n>\n> Thanks,\n> Christian.\n\nThanks and Regards,\nCharvi\n"},{"id":"407800","messageId":"20201017151358.GA2837@danh.dev","threadId":"54430","inReplyTo":"20201017075455.9660-3-charvi077@gmail.com","subject":"Re: [PATCH v2 2/5][Outreachy] t7102,t7201: remove unnecessary blank spaces in test body","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-10-17T15:13:58Z","receivedAt":"2020-10-17T15:14:03Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-10-17 13:24:52+0530, Charvi Mendiratta <charvi077@gmail.com> wrote:\n\nWelcome to the list.\n\n> Some tests use a deprecated style in which there are unnecessary blank lines after the opening quote of the test body and before the closing quote. So we should remove these unnecessary blank lines.\n\nIn Git project, we wrap the commit message's body to 72 columns per\nline (for more information, please take a look at\nDocumentation/MyFirstContribution.txt).\n\nAnd we rarely say \"we should\", if the change shouldn't be applied,\nit won't be applied.\nInstead, we ask the code base to fix itself. Perhaps:\n\n\tt7102 and t7201 still follow the old style of having blank\n\tlines around test body, which is not consistence with our\n\tcurrent practice.\n\n\tLet's remove those unnecessary blank lines.\n\nThanks,\n-- \nDanh\n"},{"id":"407835","messageId":"CAPSFM5cWx0c2CRVXxBO5Xq8AoTPSGmRa9x1hZom=cRqpOO4WkQ@mail.gmail.com","threadId":"54430","inReplyTo":"20201017151358.GA2837@danh.dev","subject":"Re: [PATCH v2 2/5][Outreachy] t7102,t7201: remove unnecessary blank spaces in test body","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-18T05:40:39Z","receivedAt":"2020-10-18T05:40:52Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"On Sat, 17 Oct 2020 at 20:44, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:\n>\n> On 2020-10-17 13:24:52+0530, Charvi Mendiratta <charvi077@gmail.com> wrote:\n>\n> Welcome to the list.\n>\n> > Some tests use a deprecated style in which there are unnecessary blank lines after the opening quote of the test body and before the closing quote. So we should remove these unnecessary blank lines.\n>\n> In Git project, we wrap the commit message's body to 72 columns per\n> line (for more information, please take a look at\n> Documentation/MyFirstContribution.txt).\n>\n\nThanks a lot Danh, I will fix it in my editor's settings and will\nupdate in the next patch series .\n\n> And we rarely say \"we should\", if the change shouldn't be applied,\n> it won't be applied.\n> Instead, we ask the code base to fix itself. Perhaps:\n>\n>         t7102 and t7201 still follow the old style of having blank\n>         lines around test body, which is not consistence with our\n>         current practice.\n>\n>         Let's remove those unnecessary blank lines.\n>\n\nNoted, will update this as well.\n\n> Thanks,\n> --\n> Danh\n\nThanks and Regards,\nCharvi\n"},{"id":"407849","messageId":"cf26c039-0870-ced6-5347-ab3f24343105@gmail.com","threadId":"54430","inReplyTo":"20201017075455.9660-5-charvi077@gmail.com","subject":"Re: [PATCH v2 4/5][Outreachy] t7201: avoid using cd outside of subshells","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2020-10-18T15:39:45Z","receivedAt":"2020-10-18T15:40:01Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"Hi Charvi\n\nCongratulations on posting your first patch series.\n\nOn 17/10/2020 08:54, Charvi Mendiratta wrote:\n> Avoid using `cd` outside of subshells since, if the test fails, there is no guarantee that the current working directory is the expected one, which may cause subsequent tests to run in the wrong directory.\n\nThat is an accurate description of why we want to avoid using `cd` \noutside of subshells. However this conversion is converting `cd` inside \na subshell to use `git -C`. I think that is worthwhile as it avoids \nhaving to use a subshell but the description should say explain that the \nconversion is desirable to avoid the cost of starting a subshell as the \noriginal test does not suffer from the problem described in your commit \nmessage.\n\nBest Wishes\n\nPhillip\n\n> \n> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>\n> ---\n>   t/t7201-co.sh | 10 ++--------\n>   1 file changed, 2 insertions(+), 8 deletions(-)\n> \n> diff --git a/t/t7201-co.sh b/t/t7201-co.sh\n> index 74553f991b..5898182fd2 100755\n> --- a/t/t7201-co.sh\n> +++ b/t/t7201-co.sh\n> @@ -339,10 +339,7 @@ test_expect_success 'switch branches while in subdirectory' '\n>   \tgit checkout master &&\n>   \n>   \tmkdir subs &&\n> -\t(\n> -\t\tcd subs &&\n> -\t\tgit checkout side\n> -\t) &&\n> +\tgit -C subs checkout side &&\n>   \t! test -f subs/one &&\n>   \trm -fr subs\n>   '\n> @@ -357,10 +354,7 @@ test_expect_success 'checkout specific path while in subdirectory' '\n>   \n>   \tgit checkout master &&\n>   \tmkdir -p subs &&\n> -\t(\n> -\t\tcd subs &&\n> -\t\tgit checkout side -- bero\n> -\t) &&\n> +\tgit -C subs checkout side -- bero &&\n>   \ttest -f subs/bero\n>   '\n>   \n> \n"},{"id":"407876","messageId":"CAPSFM5ejRWUc2mCtqTPH4a6Q-WWUC4mQHU=bsHkjJOdG4kwW0g@mail.gmail.com","threadId":"54430","inReplyTo":"cf26c039-0870-ced6-5347-ab3f24343105@gmail.com","subject":"Re: [PATCH v2 4/5][Outreachy] t7201: avoid using cd outside of subshells","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-19T12:55:35Z","receivedAt":"2020-10-19T12:55:51Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"On Sun, 18 Oct 2020 at 21:09, Phillip Wood <phillip.wood123@gmail.com> wrote:\n>\n> Hi Charvi\n>\n> Congratulations on posting your first patch series.\n>\n> On 17/10/2020 08:54, Charvi Mendiratta wrote:\n> > Avoid using `cd` outside of subshells since, if the test fails, there is no guarantee that the current working directory is the expected one, which may cause subsequent tests to run in the wrong directory.\n>\n> That is an accurate description of why we want to avoid using `cd`\n> outside of subshells. However this conversion is converting `cd` inside\n> a subshell to use `git -C`. I think that is worthwhile as it avoids\n> having to use a subshell but the description should say explain that the\n> conversion is desirable to avoid the cost of starting a subshell as the\n> original test does not suffer from the problem described in your commit\n> message.\n>\n\nThank you Philip, for corrections . I somewhat able to understand that\ncommit message\nshould be \" avoid using cd inside the subshells \" because running a\nshell script itselfs starts\na new subshell, please correct me if I am wrong . But still I am\nunable to get that why you\nmentioned the description as \"cost of starting a new subshell \" . Will\nthis not be the same subshell ?\n\n> Best Wishes\n>\n> Phillip\n>\n> >\n> > Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>\n> > ---\n> >   t/t7201-co.sh | 10 ++--------\n> >   1 file changed, 2 insertions(+), 8 deletions(-)\n> >\n> > diff --git a/t/t7201-co.sh b/t/t7201-co.sh\n> > index 74553f991b..5898182fd2 100755\n> > --- a/t/t7201-co.sh\n> > +++ b/t/t7201-co.sh\n> > @@ -339,10 +339,7 @@ test_expect_success 'switch branches while in subdirectory' '\n> >       git checkout master &&\n> >\n> >       mkdir subs &&\n> > -     (\n> > -             cd subs &&\n> > -             git checkout side\n> > -     ) &&\n\nIs there any specific meaning of writing these above two commands in\nparentheses . Will this not work the same without it ?\n\n> > +     git -C subs checkout side &&\n> >       ! test -f subs/one &&\n> >       rm -fr subs\n> >   '\n> > @@ -357,10 +354,7 @@ test_expect_success 'checkout specific path while in subdirectory' '\n> >\n> >       git checkout master &&\n> >       mkdir -p subs &&\n> > -     (\n> > -             cd subs &&\n> > -             git checkout side -- bero\n> > -     ) &&\n> > +     git -C subs checkout side -- bero &&\n> >       test -f subs/bero\n> >   '\n> >\n> >\nThanks and Regards ,\nCharvi\n"},{"id":"407877","messageId":"3b501a3a-b675-3eb7-975a-cc9206f15057@gmail.com","threadId":"54430","inReplyTo":"CAPSFM5ejRWUc2mCtqTPH4a6Q-WWUC4mQHU=bsHkjJOdG4kwW0g@mail.gmail.com","subject":"Re: [PATCH v2 4/5][Outreachy] t7201: avoid using cd outside of subshells","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2020-10-19T13:46:00Z","receivedAt":"2020-10-19T13:46:06Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"Hi Charvi\n\nOn 19/10/2020 13:55, Charvi Mendiratta wrote:\n> On Sun, 18 Oct 2020 at 21:09, Phillip Wood <phillip.wood123@gmail.com> wrote:\n>>\n>> Hi Charvi\n>>\n>> Congratulations on posting your first patch series.\n>>\n>> On 17/10/2020 08:54, Charvi Mendiratta wrote:\n>>> Avoid using `cd` outside of subshells since, if the test fails, there is no guarantee that the current working directory is the expected one, which may cause subsequent tests to run in the wrong directory.\n>>\n>> That is an accurate description of why we want to avoid using `cd`\n>> outside of subshells. However this conversion is converting `cd` inside\n>> a subshell to use `git -C`. I think that is worthwhile as it avoids\n>> having to use a subshell but the description should say explain that the\n>> conversion is desirable to avoid the cost of starting a subshell as the\n>> original test does not suffer from the problem described in your commit\n>> message.\n>>\n> \n> Thank you Philip, for corrections . I somewhat able to understand that\n> commit message\n> should be \" avoid using cd inside the subshells \" because running a\n> shell script itselfs starts\n> a new subshell, please correct me if I am wrong . But still I am\n> unable to get that why you\n> mentioned the description as \"cost of starting a new subshell \" . Will\n> this not be the same subshell ?\n\nThe original test looks something like\n(\n\tcd sub &&\n\tgit something\n) &&\n\nThe commands between the ( and ) are executed in a subshell, any changes \nmade to the current directory or shell variables in the subshell do not \naffect the rest of the test script. This is because the subshell starts \na separate shell process, but creating this separate process has a cost \nassociated with it.\n\nThe modified test looks like\n\tgit -C sub something\n\nHere we tell git to change directory before it runs the 'something' \ncommand, this is more efficient as we don't need to start any extra \nprocesses - there are no subshells.\n\nSo the purpose of this change is not to \"avoid using cd inside a \nsubshell\" but to avoid having to use a subshell at all.\n\nI hope that helps explain what a subshell is and why we want to avoid \nusing it if we can, do let me know if you want me to clarify anything.\n\nBest Wishes\n\nPhillip\n\n\n>> Best Wishes\n>>\n>> Phillip\n>>\n>>>\n>>> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>\n>>> ---\n>>>    t/t7201-co.sh | 10 ++--------\n>>>    1 file changed, 2 insertions(+), 8 deletions(-)\n>>>\n>>> diff --git a/t/t7201-co.sh b/t/t7201-co.sh\n>>> index 74553f991b..5898182fd2 100755\n>>> --- a/t/t7201-co.sh\n>>> +++ b/t/t7201-co.sh\n>>> @@ -339,10 +339,7 @@ test_expect_success 'switch branches while in subdirectory' '\n>>>        git checkout master &&\n>>>\n>>>        mkdir subs &&\n>>> -     (\n>>> -             cd subs &&\n>>> -             git checkout side\n>>> -     ) &&\n> \n> Is there any specific meaning of writing these above two commands in\n> parentheses . Will this not work the same without it ?\n> \n>>> +     git -C subs checkout side &&\n>>>        ! test -f subs/one &&\n>>>        rm -fr subs\n>>>    '\n>>> @@ -357,10 +354,7 @@ test_expect_success 'checkout specific path while in subdirectory' '\n>>>\n>>>        git checkout master &&\n>>>        mkdir -p subs &&\n>>> -     (\n>>> -             cd subs &&\n>>> -             git checkout side -- bero\n>>> -     ) &&\n>>> +     git -C subs checkout side -- bero &&\n>>>        test -f subs/bero\n>>>    '\n>>>\n>>>\n> Thanks and Regards ,\n> Charvi\n> \n"},{"id":"407881","messageId":"CAPSFM5fvBt+x840XOwzwPBvXK7_1qB-sb+_M3LoPuKv_P=VvDA@mail.gmail.com","threadId":"54430","inReplyTo":"3b501a3a-b675-3eb7-975a-cc9206f15057@gmail.com","subject":"Re: [PATCH v2 4/5][Outreachy] t7201: avoid using cd outside of subshells","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-19T17:24:57Z","receivedAt":"2020-10-19T17:26:52Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"On Mon, 19 Oct 2020 at 19:16, Phillip Wood <phillip.wood123@gmail.com> wrote:\n>\n> Hi Charvi\n>\n> On 19/10/2020 13:55, Charvi Mendiratta wrote:\n> > On Sun, 18 Oct 2020 at 21:09, Phillip Wood <phillip.wood123@gmail.com> wrote:\n> >>\n> >> Hi Charvi\n> >>\n> >> Congratulations on posting your first patch series.\n> >>\n> >> On 17/10/2020 08:54, Charvi Mendiratta wrote:\n> >>> Avoid using `cd` outside of subshells since, if the test fails, there is no guarantee that the current working directory is the expected one, which may cause subsequent tests to run in the wrong directory.\n> >>\n> >> That is an accurate description of why we want to avoid using `cd`\n> >> outside of subshells. However this conversion is converting `cd` inside\n> >> a subshell to use `git -C`. I think that is worthwhile as it avoids\n> >> having to use a subshell but the description should say explain that the\n> >> conversion is desirable to avoid the cost of starting a subshell as the\n> >> original test does not suffer from the problem described in your commit\n> >> message.\n> >>\n> >\n> > Thank you Philip, for corrections . I somewhat able to understand that\n> > commit message\n> > should be \" avoid using cd inside the subshells \" because running a\n> > shell script itselfs starts\n> > a new subshell, please correct me if I am wrong . But still I am\n> > unable to get that why you\n> > mentioned the description as \"cost of starting a new subshell \" . Will\n> > this not be the same subshell ?\n>\n> The original test looks something like\n> (\n>         cd sub &&\n>         git something\n> ) &&\n>\n> The commands between the ( and ) are executed in a subshell, any changes\n> made to the current directory or shell variables in the subshell do not\n> affect the rest of the test script. This is because the subshell starts\n> a separate shell process, but creating this separate process has a cost\n> associated with it.\n>\n> The modified test looks like\n>         git -C sub something\n>\n> Here we tell git to change directory before it runs the 'something'\n> command, this is more efficient as we don't need to start any extra\n> processes - there are no subshells.\n>\n> So the purpose of this change is not to \"avoid using cd inside a\n> subshell\" but to avoid having to use a subshell at all.\n>\n> I hope that helps explain what a subshell is and why we want to avoid\n> using it if we can, do let me know if you want me to clarify anything.\n>\n\nYes, thanks a lot Philip I understood the reason. I will do the corrections in\ncommit message and commit body as below :\nt7201: using 'git -C' to avoid subshell\n\nUsing 'git-C' instead of 'cd' inside of subshell, to avoid the extra process\nof starting a new subshell\n\nPlease confirm, if any other changes are required .\n\n> Best Wishes\n>\n> Phillip\n>\nThanks and Regards,\nCharvi\n>\n> >> Best Wishes\n> >>\n> >> Phillip\n> >>\n> >>>\n> >>> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>\n> >>> ---\n> >>>    t/t7201-co.sh | 10 ++--------\n> >>>    1 file changed, 2 insertions(+), 8 deletions(-)\n> >>>\n> >>> diff --git a/t/t7201-co.sh b/t/t7201-co.sh\n> >>> index 74553f991b..5898182fd2 100755\n> >>> --- a/t/t7201-co.sh\n> >>> +++ b/t/t7201-co.sh\n> >>> @@ -339,10 +339,7 @@ test_expect_success 'switch branches while in subdirectory' '\n> >>>        git checkout master &&\n> >>>\n> >>>        mkdir subs &&\n> >>> -     (\n> >>> -             cd subs &&\n> >>> -             git checkout side\n> >>> -     ) &&\n> >\n> > Is there any specific meaning of writing these above two commands in\n> > parentheses . Will this not work the same without it ?\n> >\n> >>> +     git -C subs checkout side &&\n> >>>        ! test -f subs/one &&\n> >>>        rm -fr subs\n> >>>    '\n> >>> @@ -357,10 +354,7 @@ test_expect_success 'checkout specific path while in subdirectory' '\n> >>>\n> >>>        git checkout master &&\n> >>>        mkdir -p subs &&\n> >>> -     (\n> >>> -             cd subs &&\n> >>> -             git checkout side -- bero\n> >>> -     ) &&\n> >>> +     git -C subs checkout side -- bero &&\n> >>>        test -f subs/bero\n> >>>    '\n> >>>\n> >>>\n> > Thanks and Regards ,\n> > Charvi\n> >\n"},{"id":"407909","messageId":"20201019202456.GC42778@nand.local","threadId":"54430","inReplyTo":"CAPSFM5fvBt+x840XOwzwPBvXK7_1qB-sb+_M3LoPuKv_P=VvDA@mail.gmail.com","subject":"Re: [PATCH v2 4/5][Outreachy] t7201: avoid using cd outside of subshells","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2020-10-19T20:25:34Z","receivedAt":"2020-10-19T20:25:40Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"Hi Charvi,\n\nOn Mon, Oct 19, 2020 at 10:54:57PM +0530, Charvi Mendiratta wrote:\n> Yes, thanks a lot Philip I understood the reason. I will do the corrections in\n> commit message and commit body as below :\n> t7201: using 'git -C' to avoid subshell\n>\n> Using 'git-C' instead of 'cd' inside of subshell, to avoid the extra process\n> of starting a new subshell\n>\n> Please confirm, if any other changes are required .\n\nUsually it never hurts to just send the patch, since any feedback that a\nreviewer has now is equally good even after you have sent a patch. Plus,\nit's easier to review the concrete patch you want applied, instead of a\nhypothetical of what you might send.\n\nThat said, a couple of notes:\n\n  - Your subject message is good. It is concise, to-the-point, and\n    accurately describes the change. Good.\n\n  - The body is similarly short, but could be rewritten to use the\n    imperative mood. But, it is redundant with the subject. The subject\n    says \"we are using 'git -C' to avoid creating a subshell\", and the\n    patch says exactly the same.\n\n...So, you can do one of two things. Either you can abbreviate the\nsubject, adding the additional detail in the patch message, or you could\nleave the subject as-is and delete the patch message entirely.\n\nEither would be fine with me, but certainly Phillip or others could\nchime in, too.\n\nThanks,\nTaylor\n"},{"id":"407958","messageId":"CAPSFM5fr4dY0tNdUrxdjhBQohX_sH0X-5m1VGHF-GAtpx0rQXA@mail.gmail.com","threadId":"54430","inReplyTo":"20201019202456.GC42778@nand.local","subject":"Re: [PATCH v2 4/5][Outreachy] t7201: avoid using cd outside of subshells","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-20T05:38:55Z","receivedAt":"2020-10-20T05:39:10Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"On Tue, 20 Oct 2020 at 01:55, Taylor Blau <me@ttaylorr.com> wrote:\n>\n> Hi Charvi,\n>\n> On Mon, Oct 19, 2020 at 10:54:57PM +0530, Charvi Mendiratta wrote:\n> > Yes, thanks a lot Philip I understood the reason. I will do the corrections in\n> > commit message and commit body as below :\n> > t7201: using 'git -C' to avoid subshell\n> >\n> > Using 'git-C' instead of 'cd' inside of subshell, to avoid the extra process\n> > of starting a new subshell\n> >\n> > Please confirm, if any other changes are required .\n>\n> Usually it never hurts to just send the patch, since any feedback that a\n> reviewer has now is equally good even after you have sent a patch. Plus,\n> it's easier to review the concrete patch you want applied, instead of a\n> hypothetical of what you might send.\n>\n\nYes, I completely agree with you . Its my fault, I will send it in the\npatch and will\ntake care of not repeating this again .\n\n> That said, a couple of notes:\n>\n>   - Your subject message is good. It is concise, to-the-point, and\n>     accurately describes the change. Good.\n>\n>   - The body is similarly short, but could be rewritten to use the\n>     imperative mood. But, it is redundant with the subject. The subject\n>     says \"we are using 'git -C' to avoid creating a subshell\", and the\n>     patch says exactly the same.\n>\n> ...So, you can do one of two things. Either you can abbreviate the\n> subject, adding the additional detail in the patch message, or you could\n> leave the subject as-is and delete the patch message entirely.\n>\nThanks Taylor, I will do the changes as you mentioned and send it in the\nnext patch .\n\n> Either would be fine with me, but certainly Phillip or others could\n> chime in, too.\n>\n> Thanks,\n> Taylor\n\nThanks and Regards,\nCharvi\n"},{"id":"407966","messageId":"6825abcc-b8e7-e539-6e8b-f46086a982d3@gmail.com","threadId":"54430","inReplyTo":"20201019202456.GC42778@nand.local","subject":"Re: [PATCH v2 4/5][Outreachy] t7201: avoid using cd outside of subshells","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2020-10-20T09:13:04Z","receivedAt":"2020-10-20T09:13:09Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"Hi Charvi\n\nOn 19/10/2020 21:25, Taylor Blau wrote:\n> Hi Charvi,\n> \n> On Mon, Oct 19, 2020 at 10:54:57PM +0530, Charvi Mendiratta wrote:\n>> Yes, thanks a lot Philip I understood the reason. I will do the corrections in\n>> commit message and commit body as below :\n>> t7201: using 'git -C' to avoid subshell\n>>\n>> Using 'git-C' instead of 'cd' inside of subshell, to avoid the extra process\n>> of starting a new subshell\n>>\n>> [...]\n> \n> That said, a couple of notes:\n> \n>    - Your subject message is good. It is concise, to-the-point, and\n>      accurately describes the change. Good.\n> \n>    - The body is similarly short, but could be rewritten to use the\n>      imperative mood. But, it is redundant with the subject. The subject\n>      says \"we are using 'git -C' to avoid creating a subshell\", and the\n>      patch says exactly the same.\n> \n> ...So, you can do one of two things. Either you can abbreviate the\n> subject, adding the additional detail in the patch message, or you could\n> leave the subject as-is and delete the patch message entirely.\n> \n> Either would be fine with me, but certainly Phillip or others could\n> chime in, too.\n\nI'm happy with either, but I would suggest changing the subject so the \ndescription starts with 'use' rather than 'using'\n\nBest Wishes\n\nPhillip\n\n> Thanks,\n> Taylor\n> \n"},{"id":"407971","messageId":"20201020114319.18245-1-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201017075455.9660-1-charvi077@gmail.com","subject":"[PATCH v3 0/5][Outreachy] modernize the test scripts","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-20T11:43:14Z","receivedAt":"2020-10-20T11:43:57Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"I thanks to the community for reviewing my patches, in this patch \nseries I have updated my commits messages and body as suggested \nby the community.  \n\nThis patch series :\n -modernize the three test scripts : t7101, t7201 and t7102.\n - cleans up with 5 types of changes in all the three scripts.\n   1. Converting the old style test format to new one\n   2. Removing blankspaces in test bodies\n   3. Removing whitespaces after the redirect operator, according to\n      CodingGuidelines \n   4. Using 'git -C' to avoid use of another subshell \n   5. Placing commands in separate lines\n\nCharvi Mendiratta (5):\n  t7101,t7102,t7201: modernize test formatting\n  t7102,t7201: remove unnecessary blank spaces in test body\n  t7102,t7201: remove whitespace after redirect operator\n  t7201: use 'git -C' to avoid subshell\n  t7201: put each command on a seperate line\n\n t/t7101-reset-empty-subdirs.sh |  66 ++++++++++-----------\n t/t7102-reset.sh               |  63 ++++++++------------\n t/t7201-co.sh                  | 102 +++++++++++++--------------------\n 3 files changed, 96 insertions(+), 135 deletions(-)\n\n-- \n2.29.0.rc1\n\n"},{"id":"407972","messageId":"20201020114319.18245-2-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201020114319.18245-1-charvi077@gmail.com","subject":"[PATCH v3 1/5][Outreachy] t7101,t7102,t7201: modernize test formatting","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-20T11:43:15Z","receivedAt":"2020-10-20T11:44:02Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Some tests in these scripts are formatted using a very old style:\n        test_expect_success \\\n            'title' \\\n            'body line 1 &&\n             body line 2'\n\nUpdating the formatting to the modern style:\n        test_expect_success 'title' '\n            body line 1 &&\n            body line 2\n        '\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7101-reset-empty-subdirs.sh | 66 +++++++++++++++++-----------------\n t/t7102-reset.sh               | 24 +++++--------\n t/t7201-co.sh                  | 31 ++++++++--------\n 3 files changed, 56 insertions(+), 65 deletions(-)\n\ndiff --git a/t/t7101-reset-empty-subdirs.sh b/t/t7101-reset-empty-subdirs.sh\nindex 96e163f084..bfce05ac5d 100755\n--- a/t/t7101-reset-empty-subdirs.sh\n+++ b/t/t7101-reset-empty-subdirs.sh\n@@ -6,16 +6,15 @@\n test_description='git reset should cull empty subdirs'\n . ./test-lib.sh\n \n-test_expect_success \\\n-    'creating initial files' \\\n-    'mkdir path0 &&\n+test_expect_success 'creating initial files' '\n+     mkdir path0 &&\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-    'creating second files' \\\n-    'mkdir path1 &&\n+test_expect_success 'creating second files' '\n+     mkdir path1 &&\n      mkdir path1/path2 &&\n      cp \"$TEST_DIRECTORY\"/../COPYING path1/path2/COPYING &&\n      cp \"$TEST_DIRECTORY\"/../COPYING path1/COPYING &&\n@@ -25,39 +24,40 @@ test_expect_success \\\n      git add path1/COPYING &&\n      git add COPYING &&\n      git add path0/COPYING-TOO &&\n-     git commit -m change -a'\n+     git commit -m change -a\n+'\n \n-test_expect_success \\\n-    'resetting tree HEAD^' \\\n-    'git reset --hard HEAD^'\n+test_expect_success 'resetting tree HEAD^' '\n+     git reset --hard HEAD^\n+'\n \n-test_expect_success \\\n-    'checking initial files exist after rewind' \\\n-    'test -d path0 &&\n-     test -f path0/COPYING'\n+test_expect_success 'checking initial files exist after rewind' '\n+     test -d path0 &&\n+     test -f path0/COPYING\n+'\n \n-test_expect_success \\\n-    'checking lack of path1/path2/COPYING' \\\n-    '! test -f path1/path2/COPYING'\n+test_expect_success 'checking lack of path1/path2/COPYING' '\n+    ! test -f path1/path2/COPYING\n+'\n \n-test_expect_success \\\n-    'checking lack of path1/COPYING' \\\n-    '! test -f path1/COPYING'\n+test_expect_success 'checking lack of path1/COPYING' '\n+    ! test -f path1/COPYING\n+'\n \n-test_expect_success \\\n-    'checking lack of COPYING' \\\n-    '! test -f COPYING'\n+test_expect_success 'checking lack of COPYING' '\n+     ! test -f COPYING\n+'\n \n-test_expect_success \\\n-    'checking checking lack of path1/COPYING-TOO' \\\n-    '! test -f path0/COPYING-TOO'\n+test_expect_success 'checking checking lack of path1/COPYING-TOO' '\n+     ! test -f path0/COPYING-TOO\n+'\n \n-test_expect_success \\\n-    'checking lack of path1/path2' \\\n-    '! test -d path1/path2'\n+test_expect_success 'checking lack of path1/path2' '\n+     ! test -d path1/path2\n+'\n \n-test_expect_success \\\n-    'checking lack of path1' \\\n-    '! test -d path1'\n+test_expect_success 'checking lack of path1' '\n+     ! test -d path1\n+'\n \n test_done\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex 22161b3b2d..fe43f77513 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -107,8 +107,7 @@ test_expect_success 'reset --soft with unmerged index should fail' '\n \tgit rm --cached -- un\n '\n \n-test_expect_success \\\n-\t'giving paths with options different than --mixed should fail' '\n+test_expect_success 'giving paths with options different than --mixed should fail' '\n \ttest_must_fail git reset --soft -- first &&\n \ttest_must_fail git reset --hard -- first &&\n \ttest_must_fail git reset --soft HEAD^ -- first &&\n@@ -128,8 +127,7 @@ test_expect_success 'giving unrecognized options should fail' '\n \tcheck_changes $head5\n '\n \n-test_expect_success \\\n-\t'trying to do reset --soft with pending merge should fail' '\n+test_expect_success 'trying to do reset --soft with pending merge should fail' '\n \tgit branch branch1 &&\n \tgit branch branch2 &&\n \n@@ -152,8 +150,7 @@ test_expect_success \\\n \tcheck_changes $head5\n '\n \n-test_expect_success \\\n-\t'trying to do reset --soft with pending checkout merge should fail' '\n+test_expect_success 'trying to do reset --soft with pending checkout merge should fail' '\n \tgit branch branch3 &&\n \tgit branch branch4 &&\n \n@@ -175,8 +172,7 @@ test_expect_success \\\n \tcheck_changes $head5\n '\n \n-test_expect_success \\\n-\t'resetting to HEAD with no changes should succeed and do nothing' '\n+test_expect_success 'resetting to HEAD with no changes should succeed and do nothing' '\n \tgit reset --hard &&\n \t\tcheck_changes $head5 &&\n \tgit reset --hard HEAD &&\n@@ -226,8 +222,7 @@ secondfile:\n 2nd line 2nd file\n 3rd line 2nd file\n EOF\n-test_expect_success \\\n-\t'changing files and redo the last commit should succeed' '\n+test_expect_success 'changing files and redo the last commit should succeed' '\n \techo \"3rd line 2nd file\" >>secondfile &&\n \tgit commit -a -C ORIG_HEAD &&\n \thead4=$(git rev-parse --verify HEAD) &&\n@@ -245,8 +240,7 @@ first:\n second:\n 2nd file\n EOF\n-test_expect_success \\\n-\t'--hard reset should change the files and undo commits permanently' '\n+test_expect_success '--hard reset should change the files and undo commits permanently' '\n \tgit reset --hard HEAD~2 &&\n \tcheck_changes $head5p2 &&\n \ttest \"$(git rev-parse ORIG_HEAD)\" = \\\n@@ -284,8 +278,7 @@ secondfile:\n 1st line 2nd file\n 2nd line 2nd file\n EOF\n-test_expect_success \\\n-\t'redoing changes adding them without commit them should succeed' '\n+test_expect_success 'redoing changes adding them without commit them should succeed' '\n \tgit rm first &&\n \tgit mv second secondfile &&\n \n@@ -380,8 +373,7 @@ secondfile:\n 1st line 2nd file\n 2nd line 2nd file\n EOF\n-test_expect_success \\\n-\t'--hard reset to ORIG_HEAD should clear a fast-forward merge' '\n+test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge' '\n \tgit reset --hard HEAD^ &&\n \tcheck_changes $head5 &&\n \ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 4d62b9b00f..a800bda5e3 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -62,7 +62,7 @@ test_expect_success setup '\n \tgit checkout master\n '\n \n-test_expect_success \"checkout from non-existing branch\" '\n+test_expect_success 'checkout from non-existing branch' '\n \n \tgit checkout -b delete-me master &&\n \tgit update-ref -d --no-deref refs/heads/delete-me &&\n@@ -71,7 +71,7 @@ test_expect_success \"checkout from non-existing branch\" '\n \ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n '\n \n-test_expect_success \"checkout with dirty tree without -m\" '\n+test_expect_success 'checkout with dirty tree without -m' '\n \n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n \tif git checkout side\n@@ -84,7 +84,7 @@ test_expect_success \"checkout with dirty tree without -m\" '\n \n '\n \n-test_expect_success \"checkout with unrelated dirty tree without -m\" '\n+test_expect_success 'checkout with unrelated dirty tree without -m' '\n \n \tgit checkout -f master &&\n \tfill 0 1 2 3 4 5 6 7 8 >same &&\n@@ -95,7 +95,7 @@ test_expect_success \"checkout with unrelated dirty tree without -m\" '\n \ttest_cmp messages.expect messages\n '\n \n-test_expect_success \"checkout -m with dirty tree\" '\n+test_expect_success 'checkout -m with dirty tree' '\n \n \tgit checkout -f master &&\n \tgit clean -f &&\n@@ -120,7 +120,7 @@ test_expect_success \"checkout -m with dirty tree\" '\n \ttest_must_be_empty current.index\n '\n \n-test_expect_success \"checkout -m with dirty tree, renamed\" '\n+test_expect_success 'checkout -m with dirty tree, renamed' '\n \n \tgit checkout -f master && git clean -f &&\n \n@@ -388,22 +388,22 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \n '\n \n-test_expect_success \\\n-    'checkout w/--track sets up tracking' '\n+test_expect_success 'checkout w/--track sets up tracking' '\n     git config branch.autosetupmerge false &&\n     git checkout master &&\n     git checkout --track -b track1 &&\n     test \"$(git config branch.track1.remote)\" &&\n-    test \"$(git config branch.track1.merge)\"'\n+    test \"$(git config branch.track1.merge)\"\n+'\n \n-test_expect_success \\\n-    'checkout w/autosetupmerge=always sets up tracking' '\n+test_expect_success 'checkout w/autosetupmerge=always sets up tracking' '\n     test_when_finished git config branch.autosetupmerge false &&\n     git config branch.autosetupmerge always &&\n     git checkout master &&\n     git checkout -b track2 &&\n     test \"$(git config branch.track2.remote)\" &&\n-    test \"$(git config branch.track2.merge)\"'\n+    test \"$(git config branch.track2.merge)\"\n+'\n \n test_expect_success 'checkout w/--track from non-branch HEAD fails' '\n     git checkout master^0 &&\n@@ -435,8 +435,7 @@ test_expect_success 'detach a symbolic link HEAD' '\n     test \"z$(git rev-parse --verify refs/heads/master)\" = \"z$here\"\n '\n \n-test_expect_success \\\n-    'checkout with --track fakes a sensible -b <name>' '\n+test_expect_success 'checkout with --track fakes a sensible -b <name>' '\n     git config remote.origin.fetch \"+refs/heads/*:refs/remotes/origin/*\" &&\n     git update-ref refs/remotes/origin/koala/bear renamer &&\n \n@@ -457,9 +456,9 @@ test_expect_success \\\n     test \"$(git rev-parse HEAD)\" = \"$(git rev-parse renamer)\"\n '\n \n-test_expect_success \\\n-    'checkout with --track, but without -b, fails with too short tracked name' '\n-    test_must_fail git checkout --track renamer'\n+test_expect_success 'checkout with --track, but without -b, fails with too short tracked name' '\n+    test_must_fail git checkout --track renamer\n+'\n \n setup_conflicting_index () {\n \trm -f .git/index &&\n-- \n2.29.0.rc1\n\n"},{"id":"407973","messageId":"20201020114319.18245-3-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201020114319.18245-1-charvi077@gmail.com","subject":"[PATCH v3 2/5][Outreachy] t7102,t7201: remove unnecessary blank spaces in test body","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-20T11:43:16Z","receivedAt":"2020-10-20T11:44:07Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"t7102 and t7201 still follow the old style of having blank\nlines around test body, which is not consistence with our\ncurrent practice.\n\nLet's remove those unnecessary blank lines.\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7102-reset.sh |  9 ---------\n t/t7201-co.sh    | 25 -------------------------\n 2 files changed, 34 deletions(-)\n\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex fe43f77513..2b4cfb2c83 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -439,7 +439,6 @@ test_expect_success 'test --mixed <paths>' '\n '\n \n test_expect_success 'test resetting the index at give paths' '\n-\n \tmkdir sub &&\n \t>sub/file1 &&\n \t>sub/file2 &&\n@@ -452,7 +451,6 @@ test_expect_success 'test resetting the index at give paths' '\n \techo \"$U\" &&\n \ttest_must_fail git diff-index --cached --exit-code \"$T\" &&\n \ttest \"$T\" != \"$U\"\n-\n '\n \n test_expect_success 'resetting an unmodified path is a no-op' '\n@@ -490,7 +488,6 @@ test_expect_success 'resetting specific path that is unmerged' '\n '\n \n test_expect_success 'disambiguation (1)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\n@@ -499,11 +496,9 @@ test_expect_success 'disambiguation (1)' '\n \ttest -z \"$(git diff --cached --name-only)\" &&\n \ttest -f secondfile &&\n \ttest_must_be_empty secondfile\n-\n '\n \n test_expect_success 'disambiguation (2)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\n@@ -511,11 +506,9 @@ test_expect_success 'disambiguation (2)' '\n \ttest_must_fail git reset secondfile &&\n \ttest -n \"$(git diff --cached --name-only -- secondfile)\" &&\n \ttest ! -f secondfile\n-\n '\n \n test_expect_success 'disambiguation (3)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\n@@ -524,11 +517,9 @@ test_expect_success 'disambiguation (3)' '\n \ttest_must_fail git diff --quiet &&\n \ttest -z \"$(git diff --cached --name-only)\" &&\n \ttest ! -f secondfile\n-\n '\n \n test_expect_success 'disambiguation (4)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex a800bda5e3..b527f8009c 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -33,7 +33,6 @@ fill () {\n \n \n test_expect_success setup '\n-\n \tfill x y z > same &&\n \tfill 1 2 3 4 5 6 7 8 >one &&\n \tfill a b c d e >two &&\n@@ -63,7 +62,6 @@ test_expect_success setup '\n '\n \n test_expect_success 'checkout from non-existing branch' '\n-\n \tgit checkout -b delete-me master &&\n \tgit update-ref -d --no-deref refs/heads/delete-me &&\n \ttest refs/heads/delete-me = \"$(git symbolic-ref HEAD)\" &&\n@@ -72,7 +70,6 @@ test_expect_success 'checkout from non-existing branch' '\n '\n \n test_expect_success 'checkout with dirty tree without -m' '\n-\n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n \tif git checkout side\n \tthen\n@@ -81,11 +78,9 @@ test_expect_success 'checkout with dirty tree without -m' '\n \telse\n \t\techo \"happy - failed correctly\"\n \tfi\n-\n '\n \n test_expect_success 'checkout with unrelated dirty tree without -m' '\n-\n \tgit checkout -f master &&\n \tfill 0 1 2 3 4 5 6 7 8 >same &&\n \tcp same kept &&\n@@ -96,7 +91,6 @@ test_expect_success 'checkout with unrelated dirty tree without -m' '\n '\n \n test_expect_success 'checkout -m with dirty tree' '\n-\n \tgit checkout -f master &&\n \tgit clean -f &&\n \n@@ -121,7 +115,6 @@ test_expect_success 'checkout -m with dirty tree' '\n '\n \n test_expect_success 'checkout -m with dirty tree, renamed' '\n-\n \tgit checkout -f master && git clean -f &&\n \n \tfill 1 2 3 4 5 7 8 >one &&\n@@ -139,11 +132,9 @@ test_expect_success 'checkout -m with dirty tree, renamed' '\n \t! test -f one &&\n \tgit diff --cached >current &&\n \ttest_must_be_empty current\n-\n '\n \n test_expect_success 'checkout -m with merge conflict' '\n-\n \tgit checkout -f master && git clean -f &&\n \n \tfill 1 T 3 4 5 6 S 8 >one &&\n@@ -166,7 +157,6 @@ test_expect_success 'checkout -m with merge conflict' '\n '\n \n test_expect_success 'format of merge conflict from checkout -m' '\n-\n \tgit checkout -f master && git clean -f &&\n \n \tfill b d > two &&\n@@ -190,7 +180,6 @@ test_expect_success 'format of merge conflict from checkout -m' '\n '\n \n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n-\n \tgit checkout -f master && git reset --hard && git clean -f &&\n \n \tfill b d > two &&\n@@ -216,7 +205,6 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n '\n \n test_expect_success 'switch to another branch while carrying a deletion' '\n-\n \tgit checkout -f master && git reset --hard && git clean -f &&\n \tgit rm two &&\n \n@@ -228,7 +216,6 @@ test_expect_success 'switch to another branch while carrying a deletion' '\n '\n \n test_expect_success 'checkout to detach HEAD (with advice declined)' '\n-\n \tgit config advice.detachedHead false &&\n \trev=$(git rev-parse --short renamer^) &&\n \tgit checkout -f renamer && git clean -f &&\n@@ -267,7 +254,6 @@ test_expect_success 'checkout to detach HEAD' '\n '\n \n test_expect_success 'checkout to detach HEAD with branchname^' '\n-\n \tgit checkout -f master && git clean -f &&\n \tgit checkout renamer^ &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -283,7 +269,6 @@ test_expect_success 'checkout to detach HEAD with branchname^' '\n '\n \n test_expect_success 'checkout to detach HEAD with :/message' '\n-\n \tgit checkout -f master && git clean -f &&\n \tgit checkout \":/Initial\" &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -299,7 +284,6 @@ test_expect_success 'checkout to detach HEAD with :/message' '\n '\n \n test_expect_success 'checkout to detach HEAD with HEAD^0' '\n-\n \tgit checkout -f master && git clean -f &&\n \tgit checkout HEAD^0 &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -315,7 +299,6 @@ test_expect_success 'checkout to detach HEAD with HEAD^0' '\n '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n-\n \tgit tag both side &&\n \tgit branch both master &&\n \tgit reset --hard &&\n@@ -327,11 +310,9 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \ttest \"z$H\" = \"z$M\" &&\n \tname=$(git symbolic-ref HEAD 2>/dev/null) &&\n \ttest \"z$name\" = zrefs/heads/both\n-\n '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n-\n \tgit reset --hard &&\n \tgit checkout master &&\n \n@@ -351,11 +332,9 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \telse\n \t\t: happy\n \tfi\n-\n '\n \n test_expect_success 'switch branches while in subdirectory' '\n-\n \tgit reset --hard &&\n \tgit checkout master &&\n \n@@ -366,11 +345,9 @@ test_expect_success 'switch branches while in subdirectory' '\n \t) &&\n \t! test -f subs/one &&\n \trm -fr subs\n-\n '\n \n test_expect_success 'checkout specific path while in subdirectory' '\n-\n \tgit reset --hard &&\n \tgit checkout side &&\n \tmkdir subs &&\n@@ -385,7 +362,6 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \t\tgit checkout side -- bero\n \t) &&\n \ttest -f subs/bero\n-\n '\n \n test_expect_success 'checkout w/--track sets up tracking' '\n@@ -608,7 +584,6 @@ test_expect_success 'failing checkout -b should not break working tree' '\n \ttest $(git symbolic-ref HEAD) = refs/heads/master &&\n \tgit diff --exit-code &&\n \tgit diff --cached --exit-code\n-\n '\n \n test_expect_success 'switch out of non-branch' '\n-- \n2.29.0.rc1\n\n"},{"id":"407974","messageId":"20201020114319.18245-4-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201020114319.18245-1-charvi077@gmail.com","subject":"[PATCH v3 3/5][Outreachy] t7102,t7201: remove whitespace after redirect operator","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-20T11:43:17Z","receivedAt":"2020-10-20T11:44:12Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"According to Documentation/CodingGuidelines, redirect\noperator is written with space before, but no space\nafter them.\n\nLet's remove these whitespaces after redirect operators.\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7102-reset.sh | 30 +++++++++++++++---------------\n t/t7201-co.sh    | 10 +++++-----\n 2 files changed, 20 insertions(+), 20 deletions(-)\n\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex 2b4cfb2c83..a8c96bf162 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -70,15 +70,15 @@ check_changes () {\n \n test_expect_success 'reset --hard message' '\n \thex=$(git log -1 --format=\"%h\") &&\n-\tgit reset --hard > .actual &&\n-\techo HEAD is now at $hex $(commit_msg) > .expected &&\n+\tgit reset --hard >.actual &&\n+\techo HEAD is now at $hex $(commit_msg) >.expected &&\n \ttest_i18ncmp .expected .actual\n '\n \n test_expect_success 'reset --hard message (ISO8859-1 logoutputencoding)' '\n \thex=$(git log -1 --format=\"%h\") &&\n-\tgit -c \"i18n.logOutputEncoding=$test_encoding\" reset --hard > .actual &&\n-\techo HEAD is now at $hex $(commit_msg $test_encoding) > .expected &&\n+\tgit -c \"i18n.logOutputEncoding=$test_encoding\" reset --hard >.actual &&\n+\techo HEAD is now at $hex $(commit_msg $test_encoding) >.expected &&\n \ttest_i18ncmp .expected .actual\n '\n \n@@ -387,25 +387,25 @@ test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge\n '\n \n test_expect_success 'test --mixed <paths>' '\n-\techo 1 > file1 &&\n-\techo 2 > file2 &&\n+\techo 1 >file1 &&\n+\techo 2 >file2 &&\n \tgit add file1 file2 &&\n \ttest_tick &&\n \tgit commit -m files &&\n \tbefore1=$(git rev-parse --short HEAD:file1) &&\n \tbefore2=$(git rev-parse --short HEAD:file2) &&\n \tgit rm file2 &&\n-\techo 3 > file3 &&\n-\techo 4 > file4 &&\n-\techo 5 > file1 &&\n+\techo 3 >file3 &&\n+\techo 4 >file4 &&\n+\techo 5 >file1 &&\n \tafter1=$(git rev-parse --short $(git hash-object file1)) &&\n \tafter4=$(git rev-parse --short $(git hash-object file4)) &&\n \tgit add file1 file3 file4 &&\n \tgit reset HEAD -- file1 file2 file3 &&\n \ttest_must_fail git diff --quiet &&\n-\tgit diff > output &&\n+\tgit diff >output &&\n \n-\tcat > expect <<-EOF &&\n+\tcat >expect <<-EOF &&\n \tdiff --git a/file1 b/file1\n \tindex $before1..$after1 100644\n \t--- a/file1\n@@ -423,9 +423,9 @@ test_expect_success 'test --mixed <paths>' '\n \tEOF\n \n \ttest_cmp expect output &&\n-\tgit diff --cached > output &&\n+\tgit diff --cached >output &&\n \n-\tcat > cached_expect <<-EOF &&\n+\tcat >cached_expect <<-EOF &&\n \tdiff --git a/file4 b/file4\n \tnew file mode 100644\n \tindex 0000000..$after4\n@@ -460,14 +460,14 @@ test_expect_success 'resetting an unmodified path is a no-op' '\n \tgit diff-index --cached --exit-code HEAD\n '\n \n-cat > expect << EOF\n+cat >expect << EOF\n Unstaged changes after reset:\n M\tfile2\n EOF\n \n test_expect_success '--mixed refreshes the index' '\n \techo 123 >> file2 &&\n-\tgit reset --mixed HEAD > output &&\n+\tgit reset --mixed HEAD >output &&\n \ttest_i18ncmp expect output\n '\n \ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex b527f8009c..74553f991b 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -33,7 +33,7 @@ fill () {\n \n \n test_expect_success setup '\n-\tfill x y z > same &&\n+\tfill x y z >same &&\n \tfill 1 2 3 4 5 6 7 8 >one &&\n \tfill a b c d e >two &&\n \tgit add same one two &&\n@@ -55,7 +55,7 @@ test_expect_success setup '\n \n \tgit checkout -b simple master &&\n \trm -f one &&\n-\tfill a c e > two &&\n+\tfill a c e >two &&\n \tgit commit -a -m \"Simple D one, M two\" &&\n \n \tgit checkout master\n@@ -95,7 +95,7 @@ test_expect_success 'checkout -m with dirty tree' '\n \tgit clean -f &&\n \n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n-\tgit checkout -m side > messages &&\n+\tgit checkout -m side >messages &&\n \n \ttest \"$(git symbolic-ref HEAD)\" = \"refs/heads/side\" &&\n \n@@ -159,7 +159,7 @@ test_expect_success 'checkout -m with merge conflict' '\n test_expect_success 'format of merge conflict from checkout -m' '\n \tgit checkout -f master && git clean -f &&\n \n-\tfill b d > two &&\n+\tfill b d >two &&\n \tgit checkout -m simple &&\n \n \tgit ls-files >current &&\n@@ -182,7 +182,7 @@ test_expect_success 'format of merge conflict from checkout -m' '\n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n \tgit checkout -f master && git reset --hard && git clean -f &&\n \n-\tfill b d > two &&\n+\tfill b d >two &&\n \tgit checkout --merge --conflict=diff3 simple &&\n \n \tcat <<-EOF >expect &&\n-- \n2.29.0.rc1\n\n"},{"id":"407975","messageId":"20201020114319.18245-5-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201020114319.18245-1-charvi077@gmail.com","subject":"[PATCH v3 4/5][Outreachy] t7201: use 'git -C' to avoid subshell","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-20T11:43:18Z","receivedAt":"2020-10-20T11:44:17Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7201-co.sh | 10 ++--------\n 1 file changed, 2 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 74553f991b..5898182fd2 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -339,10 +339,7 @@ test_expect_success 'switch branches while in subdirectory' '\n \tgit checkout master &&\n \n \tmkdir subs &&\n-\t(\n-\t\tcd subs &&\n-\t\tgit checkout side\n-\t) &&\n+\tgit -C subs checkout side &&\n \t! test -f subs/one &&\n \trm -fr subs\n '\n@@ -357,10 +354,7 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \n \tgit checkout master &&\n \tmkdir -p subs &&\n-\t(\n-\t\tcd subs &&\n-\t\tgit checkout side -- bero\n-\t) &&\n+\tgit -C subs checkout side -- bero &&\n \ttest -f subs/bero\n '\n \n-- \n2.29.0.rc1\n\n"},{"id":"407976","messageId":"20201020114319.18245-6-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201020114319.18245-1-charvi077@gmail.com","subject":"[PATCH v3 5/5][Outreachy] t7201: put each command on a seperate line","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-20T11:43:19Z","receivedAt":"2020-10-20T11:44:27Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Modern practice is to avoid multiple commands per line,\nand instead place each command on its own line.\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7201-co.sh | 26 ++++++++++++++++++--------\n 1 file changed, 18 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 5898182fd2..b36a93056f 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -157,7 +157,8 @@ test_expect_success 'checkout -m with merge conflict' '\n '\n \n test_expect_success 'format of merge conflict from checkout -m' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \n \tfill b d >two &&\n \tgit checkout -m simple &&\n@@ -180,7 +181,9 @@ test_expect_success 'format of merge conflict from checkout -m' '\n '\n \n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n-\tgit checkout -f master && git reset --hard && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit reset --hard &&\n+\tgit clean -f &&\n \n \tfill b d >two &&\n \tgit checkout --merge --conflict=diff3 simple &&\n@@ -205,7 +208,9 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n '\n \n test_expect_success 'switch to another branch while carrying a deletion' '\n-\tgit checkout -f master && git reset --hard && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit reset --hard &&\n+\tgit clean -f &&\n \tgit rm two &&\n \n \ttest_must_fail git checkout simple 2>errs &&\n@@ -218,7 +223,8 @@ test_expect_success 'switch to another branch while carrying a deletion' '\n test_expect_success 'checkout to detach HEAD (with advice declined)' '\n \tgit config advice.detachedHead false &&\n \trev=$(git rev-parse --short renamer^) &&\n-\tgit checkout -f renamer && git clean -f &&\n+\tgit checkout -f renamer &&\n+\tgit clean -f &&\n \tgit checkout renamer^ 2>messages &&\n \ttest_i18ngrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count = 1 messages &&\n@@ -237,7 +243,8 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '\n test_expect_success 'checkout to detach HEAD' '\n \tgit config advice.detachedHead true &&\n \trev=$(git rev-parse --short renamer^) &&\n-\tgit checkout -f renamer && git clean -f &&\n+\tgit checkout -f renamer &&\n+\tgit clean -f &&\n \tGIT_TEST_GETTEXT_POISON=false git checkout renamer^ 2>messages &&\n \tgrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count -gt 1 messages &&\n@@ -254,7 +261,8 @@ test_expect_success 'checkout to detach HEAD' '\n '\n \n test_expect_success 'checkout to detach HEAD with branchname^' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout renamer^ &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n@@ -269,7 +277,8 @@ test_expect_success 'checkout to detach HEAD with branchname^' '\n '\n \n test_expect_success 'checkout to detach HEAD with :/message' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout \":/Initial\" &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n@@ -284,7 +293,8 @@ test_expect_success 'checkout to detach HEAD with :/message' '\n '\n \n test_expect_success 'checkout to detach HEAD with HEAD^0' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout HEAD^0 &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n-- \n2.29.0.rc1\n\n"},{"id":"407977","messageId":"CAPSFM5daLAhNd9pmVq9-vd=1Ygx-PLKa1To16PDkUWUjebKsfA@mail.gmail.com","threadId":"54430","inReplyTo":"6825abcc-b8e7-e539-6e8b-f46086a982d3@gmail.com","subject":"Re: [PATCH v2 4/5][Outreachy] t7201: avoid using cd outside of subshells","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-20T11:48:16Z","receivedAt":"2020-10-20T11:48:33Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"On Tue, 20 Oct 2020 at 14:43, Phillip Wood <phillip.wood123@gmail.com> wrote:\n>\n> Hi Charvi\n>\n> On 19/10/2020 21:25, Taylor Blau wrote:\n> > Hi Charvi,\n> >\n> > On Mon, Oct 19, 2020 at 10:54:57PM +0530, Charvi Mendiratta wrote:\n> >> Yes, thanks a lot Philip I understood the reason. I will do the corrections in\n> >> commit message and commit body as below :\n> >> t7201: using 'git -C' to avoid subshell\n> >>\n> >> Using 'git-C' instead of 'cd' inside of subshell, to avoid the extra process\n> >> of starting a new subshell\n> >>\n> >> [...]\n> >\n> > That said, a couple of notes:\n> >\n> >    - Your subject message is good. It is concise, to-the-point, and\n> >      accurately describes the change. Good.\n> >\n> >    - The body is similarly short, but could be rewritten to use the\n> >      imperative mood. But, it is redundant with the subject. The subject\n> >      says \"we are using 'git -C' to avoid creating a subshell\", and the\n> >      patch says exactly the same.\n> >\n> > ...So, you can do one of two things. Either you can abbreviate the\n> > subject, adding the additional detail in the patch message, or you could\n> > leave the subject as-is and delete the patch message entirely.\n> >\n> > Either would be fine with me, but certainly Phillip or others could\n> > chime in, too.\n>\n> I'm happy with either, but I would suggest changing the subject so the\n> description starts with 'use' rather than 'using'\n>\n\nThank you Phillip, I have updated the changes in the next patch .\n\n> Best Wishes\n>\n> Phillip\n>\n> > Thanks,\n> > Taylor\n> >\nThanks and Regards,\nCharvi\n"},{"id":"407978","messageId":"20201020121152.21645-1-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201017075455.9660-1-charvi077@gmail.com","subject":"[PATCH v4] t7201: put each command on a separate line","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-20T12:11:52Z","receivedAt":"2020-10-20T12:13:46Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Modern practice is to avoid multiple commands per line,\nand instead place each command on its own line.\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7201-co.sh | 26 ++++++++++++++++++--------\n 1 file changed, 18 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 5898182fd2..b36a93056f 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -157,7 +157,8 @@ test_expect_success 'checkout -m with merge conflict' '\n '\n \n test_expect_success 'format of merge conflict from checkout -m' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \n \tfill b d >two &&\n \tgit checkout -m simple &&\n@@ -180,7 +181,9 @@ test_expect_success 'format of merge conflict from checkout -m' '\n '\n \n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n-\tgit checkout -f master && git reset --hard && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit reset --hard &&\n+\tgit clean -f &&\n \n \tfill b d >two &&\n \tgit checkout --merge --conflict=diff3 simple &&\n@@ -205,7 +208,9 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n '\n \n test_expect_success 'switch to another branch while carrying a deletion' '\n-\tgit checkout -f master && git reset --hard && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit reset --hard &&\n+\tgit clean -f &&\n \tgit rm two &&\n \n \ttest_must_fail git checkout simple 2>errs &&\n@@ -218,7 +223,8 @@ test_expect_success 'switch to another branch while carrying a deletion' '\n test_expect_success 'checkout to detach HEAD (with advice declined)' '\n \tgit config advice.detachedHead false &&\n \trev=$(git rev-parse --short renamer^) &&\n-\tgit checkout -f renamer && git clean -f &&\n+\tgit checkout -f renamer &&\n+\tgit clean -f &&\n \tgit checkout renamer^ 2>messages &&\n \ttest_i18ngrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count = 1 messages &&\n@@ -237,7 +243,8 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '\n test_expect_success 'checkout to detach HEAD' '\n \tgit config advice.detachedHead true &&\n \trev=$(git rev-parse --short renamer^) &&\n-\tgit checkout -f renamer && git clean -f &&\n+\tgit checkout -f renamer &&\n+\tgit clean -f &&\n \tGIT_TEST_GETTEXT_POISON=false git checkout renamer^ 2>messages &&\n \tgrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count -gt 1 messages &&\n@@ -254,7 +261,8 @@ test_expect_success 'checkout to detach HEAD' '\n '\n \n test_expect_success 'checkout to detach HEAD with branchname^' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout renamer^ &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n@@ -269,7 +277,8 @@ test_expect_success 'checkout to detach HEAD with branchname^' '\n '\n \n test_expect_success 'checkout to detach HEAD with :/message' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout \":/Initial\" &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n@@ -284,7 +293,8 @@ test_expect_success 'checkout to detach HEAD with :/message' '\n '\n \n test_expect_success 'checkout to detach HEAD with HEAD^0' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout HEAD^0 &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n-- \n2.29.0.rc1\n\n"},{"id":"408006","messageId":"20201020200907.GA75186@nand.local","threadId":"54430","inReplyTo":"CAPSFM5fr4dY0tNdUrxdjhBQohX_sH0X-5m1VGHF-GAtpx0rQXA@mail.gmail.com","subject":"Re: [PATCH v2 4/5][Outreachy] t7201: avoid using cd outside of subshells","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2020-10-20T20:09:07Z","receivedAt":"2020-10-20T20:09:14Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"Hi Charvi,\n\nOn Tue, Oct 20, 2020 at 11:08:55AM +0530, Charvi Mendiratta wrote:\n> > Usually it never hurts to just send the patch, since any feedback that a\n> > reviewer has now is equally good even after you have sent a patch. Plus,\n> > it's easier to review the concrete patch you want applied, instead of a\n> > hypothetical of what you might send.\n>\n> Yes, I completely agree with you . Its my fault, I will send it in the\n> patch and will\n> take care of not repeating this again .\n\nIt's not your fault: there's no fault to be assigned when submitting\nyour first few patches to the list. You're doing much better than I did\n;-).\n\n> > That said, a couple of notes:\n> >\n> > [...]\n> >\n> Thanks Taylor, I will do the changes as you mentioned and send it in the\n> next patch .\n\nThanks!\nTaylor\n"},{"id":"408007","messageId":"xmqqa6wgbqpq.fsf@gitster.c.googlers.com","threadId":"54430","inReplyTo":"20201020121152.21645-1-charvi077@gmail.com","subject":"Re: [PATCH v4] t7201: put each command on a separate line","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-20T20:13:53Z","receivedAt":"2020-10-20T20:13:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Charvi Mendiratta <charvi077@gmail.com> writes:\n\n> Modern practice is to avoid multiple commands per line,\n> and instead place each command on its own line.\n>\n> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>\n> ---\n\nThis looks good, but I am wondering what happened between v3 and\nv4.  \n\nAs you've demonstrated through the microproject that you can now\ncomfortably be involved in the review discussion, I am tempted to\nsuggest that we declare victory at this point and move on, but I\ndon't know what the plans are for the other 4 patches (I guess we\nwon't miss them that much---the micros are meant to be practice\ntargets).\n\nThanks.\n\n\n>  t/t7201-co.sh | 26 ++++++++++++++++++--------\n>  1 file changed, 18 insertions(+), 8 deletions(-)\n>\n> diff --git a/t/t7201-co.sh b/t/t7201-co.sh\n> index 5898182fd2..b36a93056f 100755\n> --- a/t/t7201-co.sh\n> +++ b/t/t7201-co.sh\n> @@ -157,7 +157,8 @@ test_expect_success 'checkout -m with merge conflict' '\n>  '\n>  \n>  test_expect_success 'format of merge conflict from checkout -m' '\n> -\tgit checkout -f master && git clean -f &&\n> +\tgit checkout -f master &&\n> +\tgit clean -f &&\n>  \n>  \tfill b d >two &&\n>  \tgit checkout -m simple &&\n> @@ -180,7 +181,9 @@ test_expect_success 'format of merge conflict from checkout -m' '\n>  '\n>  \n>  test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n> -\tgit checkout -f master && git reset --hard && git clean -f &&\n> +\tgit checkout -f master &&\n> +\tgit reset --hard &&\n> +\tgit clean -f &&\n>  \n>  \tfill b d >two &&\n>  \tgit checkout --merge --conflict=diff3 simple &&\n> @@ -205,7 +208,9 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n>  '\n>  \n>  test_expect_success 'switch to another branch while carrying a deletion' '\n> -\tgit checkout -f master && git reset --hard && git clean -f &&\n> +\tgit checkout -f master &&\n> +\tgit reset --hard &&\n> +\tgit clean -f &&\n>  \tgit rm two &&\n>  \n>  \ttest_must_fail git checkout simple 2>errs &&\n> @@ -218,7 +223,8 @@ test_expect_success 'switch to another branch while carrying a deletion' '\n>  test_expect_success 'checkout to detach HEAD (with advice declined)' '\n>  \tgit config advice.detachedHead false &&\n>  \trev=$(git rev-parse --short renamer^) &&\n> -\tgit checkout -f renamer && git clean -f &&\n> +\tgit checkout -f renamer &&\n> +\tgit clean -f &&\n>  \tgit checkout renamer^ 2>messages &&\n>  \ttest_i18ngrep \"HEAD is now at $rev\" messages &&\n>  \ttest_line_count = 1 messages &&\n> @@ -237,7 +243,8 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '\n>  test_expect_success 'checkout to detach HEAD' '\n>  \tgit config advice.detachedHead true &&\n>  \trev=$(git rev-parse --short renamer^) &&\n> -\tgit checkout -f renamer && git clean -f &&\n> +\tgit checkout -f renamer &&\n> +\tgit clean -f &&\n>  \tGIT_TEST_GETTEXT_POISON=false git checkout renamer^ 2>messages &&\n>  \tgrep \"HEAD is now at $rev\" messages &&\n>  \ttest_line_count -gt 1 messages &&\n> @@ -254,7 +261,8 @@ test_expect_success 'checkout to detach HEAD' '\n>  '\n>  \n>  test_expect_success 'checkout to detach HEAD with branchname^' '\n> -\tgit checkout -f master && git clean -f &&\n> +\tgit checkout -f master &&\n> +\tgit clean -f &&\n>  \tgit checkout renamer^ &&\n>  \tH=$(git rev-parse --verify HEAD) &&\n>  \tM=$(git show-ref -s --verify refs/heads/master) &&\n> @@ -269,7 +277,8 @@ test_expect_success 'checkout to detach HEAD with branchname^' '\n>  '\n>  \n>  test_expect_success 'checkout to detach HEAD with :/message' '\n> -\tgit checkout -f master && git clean -f &&\n> +\tgit checkout -f master &&\n> +\tgit clean -f &&\n>  \tgit checkout \":/Initial\" &&\n>  \tH=$(git rev-parse --verify HEAD) &&\n>  \tM=$(git show-ref -s --verify refs/heads/master) &&\n> @@ -284,7 +293,8 @@ test_expect_success 'checkout to detach HEAD with :/message' '\n>  '\n>  \n>  test_expect_success 'checkout to detach HEAD with HEAD^0' '\n> -\tgit checkout -f master && git clean -f &&\n> +\tgit checkout -f master &&\n> +\tgit clean -f &&\n>  \tgit checkout HEAD^0 &&\n>  \tH=$(git rev-parse --verify HEAD) &&\n>  \tM=$(git show-ref -s --verify refs/heads/master) &&\n"},{"id":"408008","messageId":"20201020201535.GB75186@nand.local","threadId":"54430","inReplyTo":"xmqqa6wgbqpq.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v4] t7201: put each command on a separate line","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2020-10-20T20:15:35Z","receivedAt":"2020-10-20T20:15:40Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Tue, Oct 20, 2020 at 01:13:53PM -0700, Junio C Hamano wrote:\n> Charvi Mendiratta <charvi077@gmail.com> writes:\n>\n> > Modern practice is to avoid multiple commands per line,\n> > and instead place each command on its own line.\n> >\n> > Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>\n> > ---\n>\n> This looks good, but I am wondering what happened between v3 and\n> v4.\n\nWhen I applied this locally, I used this patch as a replacement for the\nlast patch of v3 [1]. That kept everything passing after each patch.\n\n> As you've demonstrated through the microproject that you can now\n> comfortably be involved in the review discussion, I am tempted to\n> suggest that we declare victory at this point and move on, but I\n> don't know what the plans are for the other 4 patches (I guess we\n> won't miss them that much---the micros are meant to be practice\n> targets).\n\nYup, ditto.\n\n> Thanks.\n\nThanks,\nTaylor\n\n[1]: https://lore.kernel.org/git/20201020114319.18245-6-charvi077@gmail.com/\n"},{"id":"408009","messageId":"xmqq5z74bqgi.fsf@gitster.c.googlers.com","threadId":"54430","inReplyTo":"xmqqa6wgbqpq.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v4] t7201: put each command on a separate line","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-20T20:19:25Z","receivedAt":"2020-10-20T20:19:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Charvi Mendiratta <charvi077@gmail.com> writes:\n>\n>> Modern practice is to avoid multiple commands per line,\n>> and instead place each command on its own line.\n>>\n>> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>\n>> ---\n>\n> This looks good, but I am wondering what happened between v3 and\n> v4.  \n>\n> As you've demonstrated through the microproject that you can now\n> comfortably be involved in the review discussion, I am tempted to\n> suggest that we declare victory at this point and move on, but I\n> don't know what the plans are for the other 4 patches (I guess we\n> won't miss them that much---the micros are meant to be practice\n> targets).\n\nActually I take it back.  This does not look good as a standalone\npatch at all.  It seems to depend on something in the 5-patch\nseries.\n\nPlease make sure that patches you send are usable by your\nrecipients.\n\n"},{"id":"408010","messageId":"xmqq1rhsbq6a.fsf@gitster.c.googlers.com","threadId":"54430","inReplyTo":"20201020201535.GB75186@nand.local","subject":"Re: [PATCH v4] t7201: put each command on a separate line","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-20T20:25:33Z","receivedAt":"2020-10-20T20:25:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Taylor Blau <me@ttaylorr.com> writes:\n\n> On Tue, Oct 20, 2020 at 01:13:53PM -0700, Junio C Hamano wrote:\n>> Charvi Mendiratta <charvi077@gmail.com> writes:\n>>\n>> > Modern practice is to avoid multiple commands per line,\n>> > and instead place each command on its own line.\n>> >\n>> > Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>\n>> > ---\n>>\n>> This looks good, but I am wondering what happened between v3 and\n>> v4.\n>\n> When I applied this locally, I used this patch as a replacement for the\n> last patch of v3 [1]. That kept everything passing after each patch.\n\nOh, so this is a replacement for 5/5 and 1-4/5 of v4 are supposed to\nbe identical to those from v3?  The difference between [v3 5/5] and\nthis one is a single typofix on the subject line, it seems, though.\n\n>> As you've demonstrated through the microproject that you can now\n>> comfortably be involved in the review discussion, I am tempted to\n>> suggest that we declare victory at this point and move on, but I\n>> don't know what the plans are for the other 4 patches (I guess we\n>> won't miss them that much---the micros are meant to be practice\n>> targets).\n>\n> Yup, ditto.\n\nAs [v4] single patch won't apply standalone, we cannot quite declare\nthe victory yet.  Are [v3 1-5/5] (or [v3 1-4/5] + [v4]) good to the\nreviewers of the past rounds?\n"},{"id":"408011","messageId":"20201020203024.GC75186@nand.local","threadId":"54430","inReplyTo":"xmqq1rhsbq6a.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v4] t7201: put each command on a separate line","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2020-10-20T20:30:24Z","receivedAt":"2020-10-20T20:30:32Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Tue, Oct 20, 2020 at 01:25:33PM -0700, Junio C Hamano wrote:\n> Taylor Blau <me@ttaylorr.com> writes:\n> > When I applied this locally, I used this patch as a replacement for the\n> > last patch of v3 [1]. That kept everything passing after each patch.\n>\n> Oh, so this is a replacement for 5/5 and 1-4/5 of v4 are supposed to\n> be identical to those from v3?  The difference between [v3 5/5] and\n> this one is a single typofix on the subject line, it seems, though.\n\nYes, at least that's what I interpreted it as (and how I applied it when\ntesting). I'd like to hear from the author to make sure.\n\n(As an aside to the author, I often fall into the trap of thinking that\nit will be easier to send a single replacement patch which will generate\nless email, but--as you can see--it is often more complicated for\nreviewers and the maintainer to decipher what's going on. It's often\njust easier to re-submit the entire series and include in your cover\nletter \"this is unchanged from v(n-1) except for ...\").\n\n> >> As you've demonstrated through the microproject that you can now\n> >> comfortably be involved in the review discussion, I am tempted to\n> >> suggest that we declare victory at this point and move on, but I\n> >> don't know what the plans are for the other 4 patches (I guess we\n> >> won't miss them that much---the micros are meant to be practice\n> >> targets).\n> >\n> > Yup, ditto.\n>\n> As [v4] single patch won't apply standalone, we cannot quite declare\n> the victory yet.  Are [v3 1-5/5] (or [v3 1-4/5] + [v4]) good to the\n> reviewers of the past rounds?\n\nFor what it's worth, I'm happy with [v3 1-4/5] + [v4].\n\nThanks,\nTaylor\n"},{"id":"408016","messageId":"xmqqk0vka9yv.fsf@gitster.c.googlers.com","threadId":"54430","inReplyTo":"20201020203024.GC75186@nand.local","subject":"Re: [PATCH v4] t7201: put each command on a separate line","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-20T21:00:56Z","receivedAt":"2020-10-20T21:01:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Taylor Blau <me@ttaylorr.com> writes:\n\n>> As [v4] single patch won't apply standalone, we cannot quite declare\n>> the victory yet.  Are [v3 1-5/5] (or [v3 1-4/5] + [v4]) good to the\n>> reviewers of the past rounds?\n>\n> For what it's worth, I'm happy with [v3 1-4/5] + [v4].\n\nYeah, I'm happy with them, but this is an impression only from a\nquick skimming---I guess I'd just trust you and won't go back to the\npatches with fine toothed comb myself ;-).\n\nThanks, all.\n"},{"id":"408040","messageId":"CAPSFM5fQJWk5kqgaCytTZMOQDbKzCDArq0ano9ovAWVpToQAHQ@mail.gmail.com","threadId":"54430","inReplyTo":"20201020203024.GC75186@nand.local","subject":"Re: [PATCH v4] t7201: put each command on a separate line","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-21T07:14:47Z","receivedAt":"2020-10-21T07:15:01Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"On Wed, 21 Oct 2020 at 02:00, Taylor Blau <me@ttaylorr.com> wrote:\n>\n> On Tue, Oct 20, 2020 at 01:25:33PM -0700, Junio C Hamano wrote:\n> > Taylor Blau <me@ttaylorr.com> writes:\n> > > When I applied this locally, I used this patch as a replacement for the\n> > > last patch of v3 [1]. That kept everything passing after each patch.\n> >\n> > Oh, so this is a replacement for 5/5 and 1-4/5 of v4 are supposed to\n> > be identical to those from v3?  The difference between [v3 5/5] and\n> > this one is a single typofix on the subject line, it seems, though.\n>\n> Yes, at least that's what I interpreted it as (and how I applied it when\n> testing). I'd like to hear from the author to make sure.\n>\n\nI think I messed up the versions. Its correct that v4 patch was only\nreplacement for 5/5 (5th patch) of v3, since I need  to fix the typo\nerror of subject line. Also, other 4 patches (1-4/5) of v3 need to be\nremain same in v4.\n\n> (As an aside to the author, I often fall into the trap of thinking that\n> it will be easier to send a single replacement patch which will generate\n> less email, but--as you can see--it is often more complicated for\n> reviewers and the maintainer to decipher what's going on. It's often\n> just easier to re-submit the entire series and include in your cover\n> letter \"this is unchanged from v(n-1) except for ...\").\n>\n\nYes I realized this, actually earlier I was doubtful about whether to include\nthe previous version's correct patches in the new version or not. I might\nhave confirmed this before sending. But now I will strictly follow this .\n\nThanks a lot to Junio and Taylor for pointing this out. And in order to\ncorrect this, I will send the new patch series having (v3 1-4/5]+[v4]).\n\nPlease correct me, if I missed out anything else.\n\n> > >> As you've demonstrated through the microproject that you can now\n> > >> comfortably be involved in the review discussion, I am tempted to\n> > >> suggest that we declare victory at this point and move on, but I\n> > >> don't know what the plans are for the other 4 patches (I guess we\n> > >> won't miss them that much---the micros are meant to be practice\n> > >> targets).\n> > >\n> > > Yup, ditto.\n> >\n> > As [v4] single patch won't apply standalone, we cannot quite declare\n> > the victory yet.  Are [v3 1-5/5] (or [v3 1-4/5] + [v4]) good to the\n> > reviewers of the past rounds?\n>\n> For what it's worth, I'm happy with [v3 1-4/5] + [v4].\n>\n> Thanks,\n> Taylor\n\nThanks and Regards,\nCharvi\n"},{"id":"408043","messageId":"20201021124823.2217-1-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201020121152.21645-1-charvi077@gmail.com","subject":"[PATCH v5 0/5][Outreachy] modernize the test scripts","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-21T12:48:18Z","receivedAt":"2020-10-21T12:50:25Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"In this patch series, I have combined all the correct patches\nfrom version 3 and version 4 and this patch series consists of\n(v3 1-4/5 + v4) patches, else everything remains unchanged.\nI have also tested by applying it locally, in order to confirm \nthat these patches are usable.\n\nThanks to Junio and Taylor for the guidance.\n\nThis patch series :\n -modernize the three test scripts : t7101, t7201 and t7102.\n - cleans up with 5 types of changes in all the three scripts.\n   1. Converting the old style test format to new one\n   2. Removing blankspaces in test bodies\n   3. Removing whitespaces after the redirect operator, according to\n      CodingGuidelines \n   4. Using 'git -C' to avoid use of another subshell \n   5. Placing commands in separate lines\n\n\nCharvi Mendiratta (5):\n  t7101,t7102,t7201: modernize test formatting\n  t7102,t7201: remove unnecessary blank spaces in test body\n  t7102,t7201: remove whitespace after redirect operator\n  t7201: use 'git -C' to avoid subshell\n  t7201: put each command on a separate line\n\n t/t7101-reset-empty-subdirs.sh |  66 ++++++++++-----------\n t/t7102-reset.sh               |  63 ++++++++------------\n t/t7201-co.sh                  | 102 +++++++++++++--------------------\n 3 files changed, 96 insertions(+), 135 deletions(-)\n\n-- \n2.29.0.rc1\n\n"},{"id":"408044","messageId":"20201021124823.2217-2-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201021124823.2217-1-charvi077@gmail.com","subject":"[PATCH v5 1/5][Outreachy] t7101,t7102,t7201: modernize test formatting","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-21T12:48:19Z","receivedAt":"2020-10-21T12:50:46Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Some tests in these scripts are formatted using a very old style:\n        test_expect_success \\\n            'title' \\\n            'body line 1 &&\n             body line 2'\n\nUpdating the formatting to the modern style:\n        test_expect_success 'title' '\n            body line 1 &&\n            body line 2\n        '\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7101-reset-empty-subdirs.sh | 66 +++++++++++++++++-----------------\n t/t7102-reset.sh               | 24 +++++--------\n t/t7201-co.sh                  | 31 ++++++++--------\n 3 files changed, 56 insertions(+), 65 deletions(-)\n\ndiff --git a/t/t7101-reset-empty-subdirs.sh b/t/t7101-reset-empty-subdirs.sh\nindex 96e163f084..bfce05ac5d 100755\n--- a/t/t7101-reset-empty-subdirs.sh\n+++ b/t/t7101-reset-empty-subdirs.sh\n@@ -6,16 +6,15 @@\n test_description='git reset should cull empty subdirs'\n . ./test-lib.sh\n \n-test_expect_success \\\n-    'creating initial files' \\\n-    'mkdir path0 &&\n+test_expect_success 'creating initial files' '\n+     mkdir path0 &&\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-    'creating second files' \\\n-    'mkdir path1 &&\n+test_expect_success 'creating second files' '\n+     mkdir path1 &&\n      mkdir path1/path2 &&\n      cp \"$TEST_DIRECTORY\"/../COPYING path1/path2/COPYING &&\n      cp \"$TEST_DIRECTORY\"/../COPYING path1/COPYING &&\n@@ -25,39 +24,40 @@ test_expect_success \\\n      git add path1/COPYING &&\n      git add COPYING &&\n      git add path0/COPYING-TOO &&\n-     git commit -m change -a'\n+     git commit -m change -a\n+'\n \n-test_expect_success \\\n-    'resetting tree HEAD^' \\\n-    'git reset --hard HEAD^'\n+test_expect_success 'resetting tree HEAD^' '\n+     git reset --hard HEAD^\n+'\n \n-test_expect_success \\\n-    'checking initial files exist after rewind' \\\n-    'test -d path0 &&\n-     test -f path0/COPYING'\n+test_expect_success 'checking initial files exist after rewind' '\n+     test -d path0 &&\n+     test -f path0/COPYING\n+'\n \n-test_expect_success \\\n-    'checking lack of path1/path2/COPYING' \\\n-    '! test -f path1/path2/COPYING'\n+test_expect_success 'checking lack of path1/path2/COPYING' '\n+    ! test -f path1/path2/COPYING\n+'\n \n-test_expect_success \\\n-    'checking lack of path1/COPYING' \\\n-    '! test -f path1/COPYING'\n+test_expect_success 'checking lack of path1/COPYING' '\n+    ! test -f path1/COPYING\n+'\n \n-test_expect_success \\\n-    'checking lack of COPYING' \\\n-    '! test -f COPYING'\n+test_expect_success 'checking lack of COPYING' '\n+     ! test -f COPYING\n+'\n \n-test_expect_success \\\n-    'checking checking lack of path1/COPYING-TOO' \\\n-    '! test -f path0/COPYING-TOO'\n+test_expect_success 'checking checking lack of path1/COPYING-TOO' '\n+     ! test -f path0/COPYING-TOO\n+'\n \n-test_expect_success \\\n-    'checking lack of path1/path2' \\\n-    '! test -d path1/path2'\n+test_expect_success 'checking lack of path1/path2' '\n+     ! test -d path1/path2\n+'\n \n-test_expect_success \\\n-    'checking lack of path1' \\\n-    '! test -d path1'\n+test_expect_success 'checking lack of path1' '\n+     ! test -d path1\n+'\n \n test_done\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex 22161b3b2d..fe43f77513 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -107,8 +107,7 @@ test_expect_success 'reset --soft with unmerged index should fail' '\n \tgit rm --cached -- un\n '\n \n-test_expect_success \\\n-\t'giving paths with options different than --mixed should fail' '\n+test_expect_success 'giving paths with options different than --mixed should fail' '\n \ttest_must_fail git reset --soft -- first &&\n \ttest_must_fail git reset --hard -- first &&\n \ttest_must_fail git reset --soft HEAD^ -- first &&\n@@ -128,8 +127,7 @@ test_expect_success 'giving unrecognized options should fail' '\n \tcheck_changes $head5\n '\n \n-test_expect_success \\\n-\t'trying to do reset --soft with pending merge should fail' '\n+test_expect_success 'trying to do reset --soft with pending merge should fail' '\n \tgit branch branch1 &&\n \tgit branch branch2 &&\n \n@@ -152,8 +150,7 @@ test_expect_success \\\n \tcheck_changes $head5\n '\n \n-test_expect_success \\\n-\t'trying to do reset --soft with pending checkout merge should fail' '\n+test_expect_success 'trying to do reset --soft with pending checkout merge should fail' '\n \tgit branch branch3 &&\n \tgit branch branch4 &&\n \n@@ -175,8 +172,7 @@ test_expect_success \\\n \tcheck_changes $head5\n '\n \n-test_expect_success \\\n-\t'resetting to HEAD with no changes should succeed and do nothing' '\n+test_expect_success 'resetting to HEAD with no changes should succeed and do nothing' '\n \tgit reset --hard &&\n \t\tcheck_changes $head5 &&\n \tgit reset --hard HEAD &&\n@@ -226,8 +222,7 @@ secondfile:\n 2nd line 2nd file\n 3rd line 2nd file\n EOF\n-test_expect_success \\\n-\t'changing files and redo the last commit should succeed' '\n+test_expect_success 'changing files and redo the last commit should succeed' '\n \techo \"3rd line 2nd file\" >>secondfile &&\n \tgit commit -a -C ORIG_HEAD &&\n \thead4=$(git rev-parse --verify HEAD) &&\n@@ -245,8 +240,7 @@ first:\n second:\n 2nd file\n EOF\n-test_expect_success \\\n-\t'--hard reset should change the files and undo commits permanently' '\n+test_expect_success '--hard reset should change the files and undo commits permanently' '\n \tgit reset --hard HEAD~2 &&\n \tcheck_changes $head5p2 &&\n \ttest \"$(git rev-parse ORIG_HEAD)\" = \\\n@@ -284,8 +278,7 @@ secondfile:\n 1st line 2nd file\n 2nd line 2nd file\n EOF\n-test_expect_success \\\n-\t'redoing changes adding them without commit them should succeed' '\n+test_expect_success 'redoing changes adding them without commit them should succeed' '\n \tgit rm first &&\n \tgit mv second secondfile &&\n \n@@ -380,8 +373,7 @@ secondfile:\n 1st line 2nd file\n 2nd line 2nd file\n EOF\n-test_expect_success \\\n-\t'--hard reset to ORIG_HEAD should clear a fast-forward merge' '\n+test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge' '\n \tgit reset --hard HEAD^ &&\n \tcheck_changes $head5 &&\n \ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 4d62b9b00f..a800bda5e3 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -62,7 +62,7 @@ test_expect_success setup '\n \tgit checkout master\n '\n \n-test_expect_success \"checkout from non-existing branch\" '\n+test_expect_success 'checkout from non-existing branch' '\n \n \tgit checkout -b delete-me master &&\n \tgit update-ref -d --no-deref refs/heads/delete-me &&\n@@ -71,7 +71,7 @@ test_expect_success \"checkout from non-existing branch\" '\n \ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n '\n \n-test_expect_success \"checkout with dirty tree without -m\" '\n+test_expect_success 'checkout with dirty tree without -m' '\n \n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n \tif git checkout side\n@@ -84,7 +84,7 @@ test_expect_success \"checkout with dirty tree without -m\" '\n \n '\n \n-test_expect_success \"checkout with unrelated dirty tree without -m\" '\n+test_expect_success 'checkout with unrelated dirty tree without -m' '\n \n \tgit checkout -f master &&\n \tfill 0 1 2 3 4 5 6 7 8 >same &&\n@@ -95,7 +95,7 @@ test_expect_success \"checkout with unrelated dirty tree without -m\" '\n \ttest_cmp messages.expect messages\n '\n \n-test_expect_success \"checkout -m with dirty tree\" '\n+test_expect_success 'checkout -m with dirty tree' '\n \n \tgit checkout -f master &&\n \tgit clean -f &&\n@@ -120,7 +120,7 @@ test_expect_success \"checkout -m with dirty tree\" '\n \ttest_must_be_empty current.index\n '\n \n-test_expect_success \"checkout -m with dirty tree, renamed\" '\n+test_expect_success 'checkout -m with dirty tree, renamed' '\n \n \tgit checkout -f master && git clean -f &&\n \n@@ -388,22 +388,22 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \n '\n \n-test_expect_success \\\n-    'checkout w/--track sets up tracking' '\n+test_expect_success 'checkout w/--track sets up tracking' '\n     git config branch.autosetupmerge false &&\n     git checkout master &&\n     git checkout --track -b track1 &&\n     test \"$(git config branch.track1.remote)\" &&\n-    test \"$(git config branch.track1.merge)\"'\n+    test \"$(git config branch.track1.merge)\"\n+'\n \n-test_expect_success \\\n-    'checkout w/autosetupmerge=always sets up tracking' '\n+test_expect_success 'checkout w/autosetupmerge=always sets up tracking' '\n     test_when_finished git config branch.autosetupmerge false &&\n     git config branch.autosetupmerge always &&\n     git checkout master &&\n     git checkout -b track2 &&\n     test \"$(git config branch.track2.remote)\" &&\n-    test \"$(git config branch.track2.merge)\"'\n+    test \"$(git config branch.track2.merge)\"\n+'\n \n test_expect_success 'checkout w/--track from non-branch HEAD fails' '\n     git checkout master^0 &&\n@@ -435,8 +435,7 @@ test_expect_success 'detach a symbolic link HEAD' '\n     test \"z$(git rev-parse --verify refs/heads/master)\" = \"z$here\"\n '\n \n-test_expect_success \\\n-    'checkout with --track fakes a sensible -b <name>' '\n+test_expect_success 'checkout with --track fakes a sensible -b <name>' '\n     git config remote.origin.fetch \"+refs/heads/*:refs/remotes/origin/*\" &&\n     git update-ref refs/remotes/origin/koala/bear renamer &&\n \n@@ -457,9 +456,9 @@ test_expect_success \\\n     test \"$(git rev-parse HEAD)\" = \"$(git rev-parse renamer)\"\n '\n \n-test_expect_success \\\n-    'checkout with --track, but without -b, fails with too short tracked name' '\n-    test_must_fail git checkout --track renamer'\n+test_expect_success 'checkout with --track, but without -b, fails with too short tracked name' '\n+    test_must_fail git checkout --track renamer\n+'\n \n setup_conflicting_index () {\n \trm -f .git/index &&\n-- \n2.29.0.rc1\n\n"},{"id":"408045","messageId":"20201021124823.2217-3-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201021124823.2217-1-charvi077@gmail.com","subject":"[PATCH v5 2/5][Outreachy] t7102,t7201: remove unnecessary blank spaces in test body","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-21T12:48:20Z","receivedAt":"2020-10-21T12:50:52Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"t7102 and t7201 still follow the old style of having blank\nlines around test body, which is not consistence with our\ncurrent practice.\n\nLet's remove those unnecessary blank lines.\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7102-reset.sh |  9 ---------\n t/t7201-co.sh    | 25 -------------------------\n 2 files changed, 34 deletions(-)\n\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex fe43f77513..2b4cfb2c83 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -439,7 +439,6 @@ test_expect_success 'test --mixed <paths>' '\n '\n \n test_expect_success 'test resetting the index at give paths' '\n-\n \tmkdir sub &&\n \t>sub/file1 &&\n \t>sub/file2 &&\n@@ -452,7 +451,6 @@ test_expect_success 'test resetting the index at give paths' '\n \techo \"$U\" &&\n \ttest_must_fail git diff-index --cached --exit-code \"$T\" &&\n \ttest \"$T\" != \"$U\"\n-\n '\n \n test_expect_success 'resetting an unmodified path is a no-op' '\n@@ -490,7 +488,6 @@ test_expect_success 'resetting specific path that is unmerged' '\n '\n \n test_expect_success 'disambiguation (1)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\n@@ -499,11 +496,9 @@ test_expect_success 'disambiguation (1)' '\n \ttest -z \"$(git diff --cached --name-only)\" &&\n \ttest -f secondfile &&\n \ttest_must_be_empty secondfile\n-\n '\n \n test_expect_success 'disambiguation (2)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\n@@ -511,11 +506,9 @@ test_expect_success 'disambiguation (2)' '\n \ttest_must_fail git reset secondfile &&\n \ttest -n \"$(git diff --cached --name-only -- secondfile)\" &&\n \ttest ! -f secondfile\n-\n '\n \n test_expect_success 'disambiguation (3)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\n@@ -524,11 +517,9 @@ test_expect_success 'disambiguation (3)' '\n \ttest_must_fail git diff --quiet &&\n \ttest -z \"$(git diff --cached --name-only)\" &&\n \ttest ! -f secondfile\n-\n '\n \n test_expect_success 'disambiguation (4)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex a800bda5e3..b527f8009c 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -33,7 +33,6 @@ fill () {\n \n \n test_expect_success setup '\n-\n \tfill x y z > same &&\n \tfill 1 2 3 4 5 6 7 8 >one &&\n \tfill a b c d e >two &&\n@@ -63,7 +62,6 @@ test_expect_success setup '\n '\n \n test_expect_success 'checkout from non-existing branch' '\n-\n \tgit checkout -b delete-me master &&\n \tgit update-ref -d --no-deref refs/heads/delete-me &&\n \ttest refs/heads/delete-me = \"$(git symbolic-ref HEAD)\" &&\n@@ -72,7 +70,6 @@ test_expect_success 'checkout from non-existing branch' '\n '\n \n test_expect_success 'checkout with dirty tree without -m' '\n-\n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n \tif git checkout side\n \tthen\n@@ -81,11 +78,9 @@ test_expect_success 'checkout with dirty tree without -m' '\n \telse\n \t\techo \"happy - failed correctly\"\n \tfi\n-\n '\n \n test_expect_success 'checkout with unrelated dirty tree without -m' '\n-\n \tgit checkout -f master &&\n \tfill 0 1 2 3 4 5 6 7 8 >same &&\n \tcp same kept &&\n@@ -96,7 +91,6 @@ test_expect_success 'checkout with unrelated dirty tree without -m' '\n '\n \n test_expect_success 'checkout -m with dirty tree' '\n-\n \tgit checkout -f master &&\n \tgit clean -f &&\n \n@@ -121,7 +115,6 @@ test_expect_success 'checkout -m with dirty tree' '\n '\n \n test_expect_success 'checkout -m with dirty tree, renamed' '\n-\n \tgit checkout -f master && git clean -f &&\n \n \tfill 1 2 3 4 5 7 8 >one &&\n@@ -139,11 +132,9 @@ test_expect_success 'checkout -m with dirty tree, renamed' '\n \t! test -f one &&\n \tgit diff --cached >current &&\n \ttest_must_be_empty current\n-\n '\n \n test_expect_success 'checkout -m with merge conflict' '\n-\n \tgit checkout -f master && git clean -f &&\n \n \tfill 1 T 3 4 5 6 S 8 >one &&\n@@ -166,7 +157,6 @@ test_expect_success 'checkout -m with merge conflict' '\n '\n \n test_expect_success 'format of merge conflict from checkout -m' '\n-\n \tgit checkout -f master && git clean -f &&\n \n \tfill b d > two &&\n@@ -190,7 +180,6 @@ test_expect_success 'format of merge conflict from checkout -m' '\n '\n \n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n-\n \tgit checkout -f master && git reset --hard && git clean -f &&\n \n \tfill b d > two &&\n@@ -216,7 +205,6 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n '\n \n test_expect_success 'switch to another branch while carrying a deletion' '\n-\n \tgit checkout -f master && git reset --hard && git clean -f &&\n \tgit rm two &&\n \n@@ -228,7 +216,6 @@ test_expect_success 'switch to another branch while carrying a deletion' '\n '\n \n test_expect_success 'checkout to detach HEAD (with advice declined)' '\n-\n \tgit config advice.detachedHead false &&\n \trev=$(git rev-parse --short renamer^) &&\n \tgit checkout -f renamer && git clean -f &&\n@@ -267,7 +254,6 @@ test_expect_success 'checkout to detach HEAD' '\n '\n \n test_expect_success 'checkout to detach HEAD with branchname^' '\n-\n \tgit checkout -f master && git clean -f &&\n \tgit checkout renamer^ &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -283,7 +269,6 @@ test_expect_success 'checkout to detach HEAD with branchname^' '\n '\n \n test_expect_success 'checkout to detach HEAD with :/message' '\n-\n \tgit checkout -f master && git clean -f &&\n \tgit checkout \":/Initial\" &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -299,7 +284,6 @@ test_expect_success 'checkout to detach HEAD with :/message' '\n '\n \n test_expect_success 'checkout to detach HEAD with HEAD^0' '\n-\n \tgit checkout -f master && git clean -f &&\n \tgit checkout HEAD^0 &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -315,7 +299,6 @@ test_expect_success 'checkout to detach HEAD with HEAD^0' '\n '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n-\n \tgit tag both side &&\n \tgit branch both master &&\n \tgit reset --hard &&\n@@ -327,11 +310,9 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \ttest \"z$H\" = \"z$M\" &&\n \tname=$(git symbolic-ref HEAD 2>/dev/null) &&\n \ttest \"z$name\" = zrefs/heads/both\n-\n '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n-\n \tgit reset --hard &&\n \tgit checkout master &&\n \n@@ -351,11 +332,9 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \telse\n \t\t: happy\n \tfi\n-\n '\n \n test_expect_success 'switch branches while in subdirectory' '\n-\n \tgit reset --hard &&\n \tgit checkout master &&\n \n@@ -366,11 +345,9 @@ test_expect_success 'switch branches while in subdirectory' '\n \t) &&\n \t! test -f subs/one &&\n \trm -fr subs\n-\n '\n \n test_expect_success 'checkout specific path while in subdirectory' '\n-\n \tgit reset --hard &&\n \tgit checkout side &&\n \tmkdir subs &&\n@@ -385,7 +362,6 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \t\tgit checkout side -- bero\n \t) &&\n \ttest -f subs/bero\n-\n '\n \n test_expect_success 'checkout w/--track sets up tracking' '\n@@ -608,7 +584,6 @@ test_expect_success 'failing checkout -b should not break working tree' '\n \ttest $(git symbolic-ref HEAD) = refs/heads/master &&\n \tgit diff --exit-code &&\n \tgit diff --cached --exit-code\n-\n '\n \n test_expect_success 'switch out of non-branch' '\n-- \n2.29.0.rc1\n\n"},{"id":"408046","messageId":"20201021124823.2217-4-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201021124823.2217-1-charvi077@gmail.com","subject":"[PATCH v5 3/5][Outreachy] t7102,t7201: remove whitespace after redirect operator","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-21T12:48:21Z","receivedAt":"2020-10-21T12:51:04Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"According to Documentation/CodingGuidelines, redirect\noperator is written with space before, but no space\nafter them.\n\nLet's remove these whitespaces after redirect operators.\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7102-reset.sh | 30 +++++++++++++++---------------\n t/t7201-co.sh    | 10 +++++-----\n 2 files changed, 20 insertions(+), 20 deletions(-)\n\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex 2b4cfb2c83..a8c96bf162 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -70,15 +70,15 @@ check_changes () {\n \n test_expect_success 'reset --hard message' '\n \thex=$(git log -1 --format=\"%h\") &&\n-\tgit reset --hard > .actual &&\n-\techo HEAD is now at $hex $(commit_msg) > .expected &&\n+\tgit reset --hard >.actual &&\n+\techo HEAD is now at $hex $(commit_msg) >.expected &&\n \ttest_i18ncmp .expected .actual\n '\n \n test_expect_success 'reset --hard message (ISO8859-1 logoutputencoding)' '\n \thex=$(git log -1 --format=\"%h\") &&\n-\tgit -c \"i18n.logOutputEncoding=$test_encoding\" reset --hard > .actual &&\n-\techo HEAD is now at $hex $(commit_msg $test_encoding) > .expected &&\n+\tgit -c \"i18n.logOutputEncoding=$test_encoding\" reset --hard >.actual &&\n+\techo HEAD is now at $hex $(commit_msg $test_encoding) >.expected &&\n \ttest_i18ncmp .expected .actual\n '\n \n@@ -387,25 +387,25 @@ test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge\n '\n \n test_expect_success 'test --mixed <paths>' '\n-\techo 1 > file1 &&\n-\techo 2 > file2 &&\n+\techo 1 >file1 &&\n+\techo 2 >file2 &&\n \tgit add file1 file2 &&\n \ttest_tick &&\n \tgit commit -m files &&\n \tbefore1=$(git rev-parse --short HEAD:file1) &&\n \tbefore2=$(git rev-parse --short HEAD:file2) &&\n \tgit rm file2 &&\n-\techo 3 > file3 &&\n-\techo 4 > file4 &&\n-\techo 5 > file1 &&\n+\techo 3 >file3 &&\n+\techo 4 >file4 &&\n+\techo 5 >file1 &&\n \tafter1=$(git rev-parse --short $(git hash-object file1)) &&\n \tafter4=$(git rev-parse --short $(git hash-object file4)) &&\n \tgit add file1 file3 file4 &&\n \tgit reset HEAD -- file1 file2 file3 &&\n \ttest_must_fail git diff --quiet &&\n-\tgit diff > output &&\n+\tgit diff >output &&\n \n-\tcat > expect <<-EOF &&\n+\tcat >expect <<-EOF &&\n \tdiff --git a/file1 b/file1\n \tindex $before1..$after1 100644\n \t--- a/file1\n@@ -423,9 +423,9 @@ test_expect_success 'test --mixed <paths>' '\n \tEOF\n \n \ttest_cmp expect output &&\n-\tgit diff --cached > output &&\n+\tgit diff --cached >output &&\n \n-\tcat > cached_expect <<-EOF &&\n+\tcat >cached_expect <<-EOF &&\n \tdiff --git a/file4 b/file4\n \tnew file mode 100644\n \tindex 0000000..$after4\n@@ -460,14 +460,14 @@ test_expect_success 'resetting an unmodified path is a no-op' '\n \tgit diff-index --cached --exit-code HEAD\n '\n \n-cat > expect << EOF\n+cat >expect << EOF\n Unstaged changes after reset:\n M\tfile2\n EOF\n \n test_expect_success '--mixed refreshes the index' '\n \techo 123 >> file2 &&\n-\tgit reset --mixed HEAD > output &&\n+\tgit reset --mixed HEAD >output &&\n \ttest_i18ncmp expect output\n '\n \ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex b527f8009c..74553f991b 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -33,7 +33,7 @@ fill () {\n \n \n test_expect_success setup '\n-\tfill x y z > same &&\n+\tfill x y z >same &&\n \tfill 1 2 3 4 5 6 7 8 >one &&\n \tfill a b c d e >two &&\n \tgit add same one two &&\n@@ -55,7 +55,7 @@ test_expect_success setup '\n \n \tgit checkout -b simple master &&\n \trm -f one &&\n-\tfill a c e > two &&\n+\tfill a c e >two &&\n \tgit commit -a -m \"Simple D one, M two\" &&\n \n \tgit checkout master\n@@ -95,7 +95,7 @@ test_expect_success 'checkout -m with dirty tree' '\n \tgit clean -f &&\n \n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n-\tgit checkout -m side > messages &&\n+\tgit checkout -m side >messages &&\n \n \ttest \"$(git symbolic-ref HEAD)\" = \"refs/heads/side\" &&\n \n@@ -159,7 +159,7 @@ test_expect_success 'checkout -m with merge conflict' '\n test_expect_success 'format of merge conflict from checkout -m' '\n \tgit checkout -f master && git clean -f &&\n \n-\tfill b d > two &&\n+\tfill b d >two &&\n \tgit checkout -m simple &&\n \n \tgit ls-files >current &&\n@@ -182,7 +182,7 @@ test_expect_success 'format of merge conflict from checkout -m' '\n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n \tgit checkout -f master && git reset --hard && git clean -f &&\n \n-\tfill b d > two &&\n+\tfill b d >two &&\n \tgit checkout --merge --conflict=diff3 simple &&\n \n \tcat <<-EOF >expect &&\n-- \n2.29.0.rc1\n\n"},{"id":"408047","messageId":"20201021124823.2217-5-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201021124823.2217-1-charvi077@gmail.com","subject":"[PATCH v5 4/5][Outreachy] t7201: use 'git -C' to avoid subshell","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-21T12:48:22Z","receivedAt":"2020-10-21T12:51:11Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7201-co.sh | 10 ++--------\n 1 file changed, 2 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 74553f991b..5898182fd2 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -339,10 +339,7 @@ test_expect_success 'switch branches while in subdirectory' '\n \tgit checkout master &&\n \n \tmkdir subs &&\n-\t(\n-\t\tcd subs &&\n-\t\tgit checkout side\n-\t) &&\n+\tgit -C subs checkout side &&\n \t! test -f subs/one &&\n \trm -fr subs\n '\n@@ -357,10 +354,7 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \n \tgit checkout master &&\n \tmkdir -p subs &&\n-\t(\n-\t\tcd subs &&\n-\t\tgit checkout side -- bero\n-\t) &&\n+\tgit -C subs checkout side -- bero &&\n \ttest -f subs/bero\n '\n \n-- \n2.29.0.rc1\n\n"},{"id":"408048","messageId":"20201021124823.2217-6-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201021124823.2217-1-charvi077@gmail.com","subject":"[PATCH v5 5/5][Outreachy] t7201: put each command on a separate line","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-21T12:48:23Z","receivedAt":"2020-10-21T12:51:24Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Modern practice is to avoid multiple commands per line,\nand instead place each command on its own line.\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7201-co.sh | 26 ++++++++++++++++++--------\n 1 file changed, 18 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 5898182fd2..b36a93056f 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -157,7 +157,8 @@ test_expect_success 'checkout -m with merge conflict' '\n '\n \n test_expect_success 'format of merge conflict from checkout -m' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \n \tfill b d >two &&\n \tgit checkout -m simple &&\n@@ -180,7 +181,9 @@ test_expect_success 'format of merge conflict from checkout -m' '\n '\n \n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n-\tgit checkout -f master && git reset --hard && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit reset --hard &&\n+\tgit clean -f &&\n \n \tfill b d >two &&\n \tgit checkout --merge --conflict=diff3 simple &&\n@@ -205,7 +208,9 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n '\n \n test_expect_success 'switch to another branch while carrying a deletion' '\n-\tgit checkout -f master && git reset --hard && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit reset --hard &&\n+\tgit clean -f &&\n \tgit rm two &&\n \n \ttest_must_fail git checkout simple 2>errs &&\n@@ -218,7 +223,8 @@ test_expect_success 'switch to another branch while carrying a deletion' '\n test_expect_success 'checkout to detach HEAD (with advice declined)' '\n \tgit config advice.detachedHead false &&\n \trev=$(git rev-parse --short renamer^) &&\n-\tgit checkout -f renamer && git clean -f &&\n+\tgit checkout -f renamer &&\n+\tgit clean -f &&\n \tgit checkout renamer^ 2>messages &&\n \ttest_i18ngrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count = 1 messages &&\n@@ -237,7 +243,8 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '\n test_expect_success 'checkout to detach HEAD' '\n \tgit config advice.detachedHead true &&\n \trev=$(git rev-parse --short renamer^) &&\n-\tgit checkout -f renamer && git clean -f &&\n+\tgit checkout -f renamer &&\n+\tgit clean -f &&\n \tGIT_TEST_GETTEXT_POISON=false git checkout renamer^ 2>messages &&\n \tgrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count -gt 1 messages &&\n@@ -254,7 +261,8 @@ test_expect_success 'checkout to detach HEAD' '\n '\n \n test_expect_success 'checkout to detach HEAD with branchname^' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout renamer^ &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n@@ -269,7 +277,8 @@ test_expect_success 'checkout to detach HEAD with branchname^' '\n '\n \n test_expect_success 'checkout to detach HEAD with :/message' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout \":/Initial\" &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n@@ -284,7 +293,8 @@ test_expect_success 'checkout to detach HEAD with :/message' '\n '\n \n test_expect_success 'checkout to detach HEAD with HEAD^0' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout HEAD^0 &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n-- \n2.29.0.rc1\n\n"},{"id":"408050","messageId":"CAPSFM5edytA_RR_ykYFnWdpbG8ThoESYh+JCSYQ83j4w8k1sDQ@mail.gmail.com","threadId":"54430","inReplyTo":"xmqq5z74bqgi.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v4] t7201: put each command on a separate line","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-21T13:16:13Z","receivedAt":"2020-10-21T13:16:30Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"On Wed, 21 Oct 2020 at 01:49, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n> > Charvi Mendiratta <charvi077@gmail.com> writes:\n> >\n> >> Modern practice is to avoid multiple commands per line,\n> >> and instead place each command on its own line.\n> >>\n> >> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>\n> >> ---\n> >\n> > This looks good, but I am wondering what happened between v3 and\n> > v4.\n> >\n> > As you've demonstrated through the microproject that you can now\n> > comfortably be involved in the review discussion, I am tempted to\n> > suggest that we declare victory at this point and move on, but I\n> > don't know what the plans are for the other 4 patches (I guess we\n> > won't miss them that much---the micros are meant to be practice\n> > targets).\n>\n> Actually I take it back.  This does not look good as a standalone\n> patch at all.  It seems to depend on something in the 5-patch\n> series.\n>\n\nYes, Thanks a lot Junio. I totally agree after applying it locally and\ngetting stuck in am conflicts without using v3.\n\n> Please make sure that patches you send are usable by your\n> recipients.\n>\nI will take this as an important note. I have fixed it and sent the patch\nseries after testing it locally .\n\nThanks and Regards,\nCharvi\n"},{"id":"408071","messageId":"CAPig+cRzLpY4Pe11SQ0uux-_+x_CSVYM1FvRvDebH3TNi-bVow@mail.gmail.com","threadId":"54430","inReplyTo":"20201021124823.2217-4-charvi077@gmail.com","subject":"Re: [PATCH v5 3/5][Outreachy] t7102,t7201: remove whitespace after redirect operator","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2020-10-21T17:20:06Z","receivedAt":"2020-10-21T17:20:20Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Oct 21, 2020 at 8:51 AM Charvi Mendiratta <charvi077@gmail.com> wrote:\n> According to Documentation/CodingGuidelines, redirect\n> operator is written with space before, but no space\n> after them.\n>\n> Let's remove these whitespaces after redirect operators.\n>\n> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>\n> ---\n> diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\n> @@ -460,14 +460,14 @@ test_expect_success 'resetting an unmodified path is a no-op' '\n> -cat > expect << EOF\n> +cat >expect << EOF\n\nThere's still a space after the '<<' operator which should be removed:\n\n    cat >expect <<EOF\n"},{"id":"408142","messageId":"xmqq36264xx5.fsf@gitster.c.googlers.com","threadId":"54430","inReplyTo":"CAPig+cRzLpY4Pe11SQ0uux-_+x_CSVYM1FvRvDebH3TNi-bVow@mail.gmail.com","subject":"Re: [PATCH v5 3/5][Outreachy] t7102,t7201: remove whitespace after redirect operator","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-22T05:44:38Z","receivedAt":"2020-10-22T05:44:44Z","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 Wed, Oct 21, 2020 at 8:51 AM Charvi Mendiratta <charvi077@gmail.com> wrote:\n>> According to Documentation/CodingGuidelines, redirect\n>> operator is written with space before, but no space\n>> after them.\n>>\n>> Let's remove these whitespaces after redirect operators.\n>>\n>> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>\n>> ---\n>> diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\n>> @@ -460,14 +460,14 @@ test_expect_success 'resetting an unmodified path is a no-op' '\n>> -cat > expect << EOF\n>> +cat >expect << EOF\n>\n> There's still a space after the '<<' operator which should be removed:\n>\n>     cat >expect <<EOF\n\nAlso, this is outside any test_expect_*, which is unusual in\nmodernized test scripts.  There are many other instances of\npreparing expected output outside test_expect_* in this file,\nso we may need another patch to clean them up.\n\nFor now, within the context of this patch, let's just fix the space\nafter the << here-doc redirection operator, as you spotted.  The\nattached I'll squash into this patch.\n\nThanks.\n\n t/t7102-reset.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git i/t/t7102-reset.sh w/t/t7102-reset.sh\nindex a8c96bf162..07acaa2beb 100755\n--- i/t/t7102-reset.sh\n+++ w/t/t7102-reset.sh\n@@ -460,7 +460,7 @@ test_expect_success 'resetting an unmodified path is a no-op' '\n \tgit diff-index --cached --exit-code HEAD\n '\n \n-cat >expect << EOF\n+cat >expect <<EOF\n Unstaged changes after reset:\n M\tfile2\n EOF\n\n\n\n"},{"id":"408143","messageId":"CAPig+cSXgrLOfMgN2L6BnTnaCBd-h5DJaKsdOV8JePXmzeE_dQ@mail.gmail.com","threadId":"54430","inReplyTo":"xmqq36264xx5.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v5 3/5][Outreachy] t7102,t7201: remove whitespace after redirect operator","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2020-10-22T05:53:31Z","receivedAt":"2020-10-22T05:54:19Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Oct 22, 2020 at 1:44 AM Junio C Hamano <gitster@pobox.com> wrote:\n> Eric Sunshine <sunshine@sunshineco.com> writes:\n> > There's still a space after the '<<' operator which should be removed:\n> >\n> >     cat >expect <<EOF\n>\n> Also, this is outside any test_expect_*, which is unusual in\n> modernized test scripts.  There are many other instances of\n> preparing expected output outside test_expect_* in this file,\n> so we may need another patch to clean them up.\n\nI noticed that, as well, but wasn't sure if mentioning it was\nworthwhile considering that this is a microproject and we're already\nat v5. It can certainly be addressed by someone as a follow-on patch\nif desired.\n\n> For now, within the context of this patch, let's just fix the space\n> after the << here-doc redirection operator, as you spotted.  The\n> attached I'll squash into this patch.\n>\n> -cat >expect << EOF\n> +cat >expect <<EOF\n\nLooks fine.\n"},{"id":"408144","messageId":"xmqqh7qmolch.fsf@gitster.c.googlers.com","threadId":"54430","inReplyTo":"xmqq36264xx5.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v5 3/5][Outreachy] t7102,t7201: remove whitespace after redirect operator","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-22T05:55:58Z","receivedAt":"2020-10-22T05:56:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Also, this is outside any test_expect_*, which is unusual in\n> modernized test scripts.  There are many other instances of\n> preparing expected output outside test_expect_* in this file,\n> so we may need another patch to clean them up.\n>\n> For now, within the context of this patch, let's just fix the space\n> after the << here-doc redirection operator, as you spotted.  The\n> attached I'll squash into this patch.\n\nAnd the other clean-up patch would look like this.\n\n--- >8 ---\nSubject: t7102: prepare expected output inside test_expect_* block\n\nThat way we can notice if there is a breakage/bug in the parts of\nthe test that prepare the expected outcome, which is how modern\ntests are arranged.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t7102-reset.sh | 244 +++++++++++++++++++++++++++----------------------------\n 1 file changed, 121 insertions(+), 123 deletions(-)\n\ndiff --git c/t/t7102-reset.sh w/t/t7102-reset.sh\nindex 07acaa2beb..821e8bb94d 100755\n--- c/t/t7102-reset.sh\n+++ w/t/t7102-reset.sh\n@@ -82,15 +82,15 @@ test_expect_success 'reset --hard message (ISO8859-1 logoutputencoding)' '\n \ttest_i18ncmp .expected .actual\n '\n \n->.diff_expect\n->.cached_expect\n-cat >.cat_expect <<EOF\n-secondfile:\n-1st line 2nd file\n-2nd line 2nd file\n-EOF\n-\n test_expect_success 'giving a non existing revision should fail' '\n+\t>.diff_expect &&\n+\t>.cached_expect &&\n+\tcat >.cat_expect <<-\\EOF &&\n+\tsecondfile:\n+\t1st line 2nd file\n+\t2nd line 2nd file\n+\tEOF\n+\n \ttest_must_fail git reset aaaaaa &&\n \ttest_must_fail git reset --mixed aaaaaa &&\n \ttest_must_fail git reset --soft aaaaaa &&\n@@ -191,38 +191,38 @@ test_expect_success 'resetting to HEAD with no changes should succeed and do not\n \t\tcheck_changes $head5\n '\n \n->.diff_expect\n-cat >.cached_expect <<EOF\n-diff --git a/secondfile b/secondfile\n-index $head5p1s..$head5s 100644\n---- a/secondfile\n-+++ b/secondfile\n-@@ -1 +1,2 @@\n--2nd file\n-+1st line 2nd file\n-+2nd line 2nd file\n-EOF\n-cat >.cat_expect <<EOF\n-secondfile:\n-1st line 2nd file\n-2nd line 2nd file\n-EOF\n test_expect_success '--soft reset only should show changes in diff --cached' '\n+\t>.diff_expect &&\n+\tcat >.cached_expect <<-EOF &&\n+\tdiff --git a/secondfile b/secondfile\n+\tindex $head5p1s..$head5s 100644\n+\t--- a/secondfile\n+\t+++ b/secondfile\n+\t@@ -1 +1,2 @@\n+\t-2nd file\n+\t+1st line 2nd file\n+\t+2nd line 2nd file\n+\tEOF\n+\tcat >.cat_expect <<-\\EOF &&\n+\tsecondfile:\n+\t1st line 2nd file\n+\t2nd line 2nd file\n+\tEOF\n \tgit reset --soft HEAD^ &&\n \tcheck_changes $head5p1 &&\n \ttest \"$(git rev-parse ORIG_HEAD)\" = \\\n \t\t\t$head5\n '\n \n->.diff_expect\n->.cached_expect\n-cat >.cat_expect <<EOF\n-secondfile:\n-1st line 2nd file\n-2nd line 2nd file\n-3rd line 2nd file\n-EOF\n test_expect_success 'changing files and redo the last commit should succeed' '\n+\t>.diff_expect &&\n+\t>.cached_expect &&\n+\tcat >.cat_expect <<-\\EOF &&\n+\tsecondfile:\n+\t1st line 2nd file\n+\t2nd line 2nd file\n+\t3rd line 2nd file\n+\tEOF\n \techo \"3rd line 2nd file\" >>secondfile &&\n \tgit commit -a -C ORIG_HEAD &&\n \thead4=$(git rev-parse --verify HEAD) &&\n@@ -231,54 +231,54 @@ test_expect_success 'changing files and redo the last commit should succeed' '\n \t\t\t$head5\n '\n \n->.diff_expect\n->.cached_expect\n-cat >.cat_expect <<EOF\n-first:\n-1st file\n-2nd line 1st file\n-second:\n-2nd file\n-EOF\n test_expect_success '--hard reset should change the files and undo commits permanently' '\n+\t>.diff_expect &&\n+\t>.cached_expect &&\n+\tcat >.cat_expect <<-\\EOF &&\n+\tfirst:\n+\t1st file\n+\t2nd line 1st file\n+\tsecond:\n+\t2nd file\n+\tEOF\n \tgit reset --hard HEAD~2 &&\n \tcheck_changes $head5p2 &&\n \ttest \"$(git rev-parse ORIG_HEAD)\" = \\\n \t\t\t$head4\n '\n \n->.diff_expect\n-cat >.cached_expect <<EOF\n-diff --git a/first b/first\n-deleted file mode 100644\n-index $head5p2f..0000000\n---- a/first\n-+++ /dev/null\n-@@ -1,2 +0,0 @@\n--1st file\n--2nd line 1st file\n-diff --git a/second b/second\n-deleted file mode 100644\n-index $head5p1s..0000000\n---- a/second\n-+++ /dev/null\n-@@ -1 +0,0 @@\n--2nd file\n-diff --git a/secondfile b/secondfile\n-new file mode 100644\n-index 0000000..$head5s\n---- /dev/null\n-+++ b/secondfile\n-@@ -0,0 +1,2 @@\n-+1st line 2nd file\n-+2nd line 2nd file\n-EOF\n-cat >.cat_expect <<EOF\n-secondfile:\n-1st line 2nd file\n-2nd line 2nd file\n-EOF\n test_expect_success 'redoing changes adding them without commit them should succeed' '\n+\t>.diff_expect &&\n+\tcat >.cached_expect <<-EOF &&\n+\tdiff --git a/first b/first\n+\tdeleted file mode 100644\n+\tindex $head5p2f..0000000\n+\t--- a/first\n+\t+++ /dev/null\n+\t@@ -1,2 +0,0 @@\n+\t-1st file\n+\t-2nd line 1st file\n+\tdiff --git a/second b/second\n+\tdeleted file mode 100644\n+\tindex $head5p1s..0000000\n+\t--- a/second\n+\t+++ /dev/null\n+\t@@ -1 +0,0 @@\n+\t-2nd file\n+\tdiff --git a/secondfile b/secondfile\n+\tnew file mode 100644\n+\tindex 0000000..$head5s\n+\t--- /dev/null\n+\t+++ b/secondfile\n+\t@@ -0,0 +1,2 @@\n+\t+1st line 2nd file\n+\t+2nd line 2nd file\n+\tEOF\n+\tcat >.cat_expect <<-\\EOF &&\n+\tsecondfile:\n+\t1st line 2nd file\n+\t2nd line 2nd file\n+\tEOF\n \tgit rm first &&\n \tgit mv second secondfile &&\n \n@@ -288,46 +288,45 @@ test_expect_success 'redoing changes adding them without commit them should succ\n \tcheck_changes $head5p2\n '\n \n-cat >.diff_expect <<EOF\n-diff --git a/first b/first\n-deleted file mode 100644\n-index $head5p2f..0000000\n---- a/first\n-+++ /dev/null\n-@@ -1,2 +0,0 @@\n--1st file\n--2nd line 1st file\n-diff --git a/second b/second\n-deleted file mode 100644\n-index $head5p1s..0000000\n---- a/second\n-+++ /dev/null\n-@@ -1 +0,0 @@\n--2nd file\n-EOF\n->.cached_expect\n-cat >.cat_expect <<EOF\n-secondfile:\n-1st line 2nd file\n-2nd line 2nd file\n-EOF\n test_expect_success '--mixed reset to HEAD should unadd the files' '\n+\tcat >.diff_expect <<-EOF &&\n+\tdiff --git a/first b/first\n+\tdeleted file mode 100644\n+\tindex $head5p2f..0000000\n+\t--- a/first\n+\t+++ /dev/null\n+\t@@ -1,2 +0,0 @@\n+\t-1st file\n+\t-2nd line 1st file\n+\tdiff --git a/second b/second\n+\tdeleted file mode 100644\n+\tindex $head5p1s..0000000\n+\t--- a/second\n+\t+++ /dev/null\n+\t@@ -1 +0,0 @@\n+\t-2nd file\n+\tEOF\n+\t>.cached_expect &&\n+\tcat >.cat_expect <<-\\EOF &&\n+\tsecondfile:\n+\t1st line 2nd file\n+\t2nd line 2nd file\n+\tEOF\n \tgit reset &&\n \tcheck_changes $head5p2 &&\n \ttest \"$(git rev-parse ORIG_HEAD)\" = $head5p2\n '\n \n->.diff_expect\n->.cached_expect\n-cat >.cat_expect <<EOF\n-secondfile:\n-1st line 2nd file\n-2nd line 2nd file\n-EOF\n test_expect_success 'redoing the last two commits should succeed' '\n+\t>.diff_expect &&\n+\t>.cached_expect &&\n+\tcat >.cat_expect <<-\\EOF &&\n+\tsecondfile:\n+\t1st line 2nd file\n+\t2nd line 2nd file\n+\tEOF\n \tgit add secondfile &&\n \tgit reset --hard $head5p2 &&\n-\n \tgit rm first &&\n \tgit mv second secondfile &&\n \tgit commit -a -m \"remove 1st and rename 2nd\" &&\n@@ -340,15 +339,15 @@ test_expect_success 'redoing the last two commits should succeed' '\n \tcheck_changes $head5\n '\n \n->.diff_expect\n->.cached_expect\n-cat >.cat_expect <<EOF\n-secondfile:\n-1st line 2nd file\n-2nd line 2nd file\n-3rd line in branch2\n-EOF\n test_expect_success '--hard reset to HEAD should clear a failed merge' '\n+\t>.diff_expect &&\n+\t>.cached_expect &&\n+\tcat >.cat_expect <<-\\EOF &&\n+\tsecondfile:\n+\t1st line 2nd file\n+\t2nd line 2nd file\n+\t3rd line in branch2\n+\tEOF\n \tgit branch branch1 &&\n \tgit branch branch2 &&\n \n@@ -366,14 +365,14 @@ test_expect_success '--hard reset to HEAD should clear a failed merge' '\n \tcheck_changes $head3\n '\n \n->.diff_expect\n->.cached_expect\n-cat >.cat_expect <<EOF\n-secondfile:\n-1st line 2nd file\n-2nd line 2nd file\n-EOF\n test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge' '\n+\t>.diff_expect &&\n+\t>.cached_expect &&\n+\tcat >.cat_expect <<-\\EOF &&\n+\tsecondfile:\n+\t1st line 2nd file\n+\t2nd line 2nd file\n+\tEOF\n \tgit reset --hard HEAD^ &&\n \tcheck_changes $head5 &&\n \n@@ -460,12 +459,11 @@ test_expect_success 'resetting an unmodified path is a no-op' '\n \tgit diff-index --cached --exit-code HEAD\n '\n \n-cat >expect <<EOF\n-Unstaged changes after reset:\n-M\tfile2\n-EOF\n-\n test_expect_success '--mixed refreshes the index' '\n+\tcat >expect <<-\\EOF &&\n+\tUnstaged changes after reset:\n+\tM\tfile2\n+\tEOF\n \techo 123 >> file2 &&\n \tgit reset --mixed HEAD >output &&\n \ttest_i18ncmp expect output\n"},{"id":"408145","messageId":"CAPig+cSL-9o=c=iYtvHNDZmtRVoy2=EED1RdoX2Tsjnm3ioevQ@mail.gmail.com","threadId":"54430","inReplyTo":"xmqqh7qmolch.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v5 3/5][Outreachy] t7102,t7201: remove whitespace after redirect operator","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2020-10-22T06:04:01Z","receivedAt":"2020-10-22T06:04:18Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Oct 22, 2020 at 1:56 AM Junio C Hamano <gitster@pobox.com> wrote:\n> Subject: t7102: prepare expected output inside test_expect_* block\n>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n> diff --git c/t/t7102-reset.sh w/t/t7102-reset.sh\n> @@ -82,15 +82,15 @@ test_expect_success 'reset --hard message (ISO8859-1 logoutputencoding)' '\n> ->.diff_expect\n> ->.cached_expect\n> -cat >.cat_expect <<EOF\n> -secondfile:\n> -EOF\n> -\n>  test_expect_success 'giving a non existing revision should fail' '\n> +       >.diff_expect &&\n> +       >.cached_expect &&\n> +       cat >.cat_expect <<-\\EOF &&\n> +       secondfile:\n> +       EOF\n\nYou used <<-\\EOF rather than plain <<-EOF when possible. Good.\n\n(Might be worth mention in the commit message, but perhaps too minor?)\n\n> @@ -191,38 +191,38 @@ test_expect_success 'resetting to HEAD with no changes should succeed and do not\n>  test_expect_success '--soft reset only should show changes in diff --cached' '\n> +       >.diff_expect &&\n> +       cat >.cached_expect <<-EOF &&\n> +       diff --git a/secondfile b/secondfile\n> +       index $head5p1s..$head5s 100644\n\nAnd used plain <<-EOF when necessary. Fine.\n"},{"id":"408147","messageId":"CAPSFM5d+GSOTAUiea_6oX-Wdk95b=r6aGY-smia+bDD17i4-8w@mail.gmail.com","threadId":"54430","inReplyTo":"xmqq36264xx5.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v5 3/5][Outreachy] t7102,t7201: remove whitespace after redirect operator","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-22T06:29:43Z","receivedAt":"2020-10-22T06:29:59Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"On Thu, 22 Oct 2020 at 11:14, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Eric Sunshine <sunshine@sunshineco.com> writes:\n>\n> > On Wed, Oct 21, 2020 at 8:51 AM Charvi Mendiratta <charvi077@gmail.com> wrote:\n> >> According to Documentation/CodingGuidelines, redirect\n> >> operator is written with space before, but no space\n> >> after them.\n> >>\n> >> Let's remove these whitespaces after redirect operators.\n> >>\n> >> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>\n> >> ---\n> >> diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\n> >> @@ -460,14 +460,14 @@ test_expect_success 'resetting an unmodified path is a no-op' '\n> >> -cat > expect << EOF\n> >> +cat >expect << EOF\n> >\n> > There's still a space after the '<<' operator which should be removed:\n> >\n> >     cat >expect <<EOF\n>\n> Also, this is outside any test_expect_*, which is unusual in\n> modernized test scripts.  There are many other instances of\n> preparing expected output outside test_expect_* in this file,\n> so we may need another patch to clean them up.\n>\n> For now, within the context of this patch, let's just fix the space\n> after the << here-doc redirection operator, as you spotted.  The\n> attached I'll squash into this patch.\n>\n> Thanks.\n>\n\nThanks Eric and Junio, I am resending the patch with the fix of\nspace after <<  as mentioned.\n\n>  t/t7102-reset.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git i/t/t7102-reset.sh w/t/t7102-reset.sh\n> index a8c96bf162..07acaa2beb 100755\n> --- i/t/t7102-reset.sh\n> +++ w/t/t7102-reset.sh\n> @@ -460,7 +460,7 @@ test_expect_success 'resetting an unmodified path is a no-op' '\n>         git diff-index --cached --exit-code HEAD\n>  '\n>\n> -cat >expect << EOF\n> +cat >expect <<EOF\n>  Unstaged changes after reset:\n>  M      file2\n>  EOF\n>\n>\n>\n"},{"id":"408148","messageId":"20201022071649.24284-1-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201021124823.2217-1-charvi077@gmail.com","subject":"[PATCH v6 0/5][Outreachy] modernize test scripts","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-22T07:16:45Z","receivedAt":"2020-10-22T07:19:41Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"In this patch series, I have fixed the remaining errors of \nwhitespace after redirect operator in t7102 test script and\nv5 3/5 is updated. Other patches remains unchanged.\n\nThis patch series :\n -modernize the three test scripts : t7101, t7201 and t7102.\n - cleans up with 5 types of changes in all the three scripts.\n   1. Converting the old style test format to new one\n   2. Removing blankspaces in test bodies\n   3. Removing whitespaces after the redirect operator, according to\n      CodingGuidelines \n   4. Using 'git -C' to avoid use of another subshell \n   5. Placing commands in separate lines\n\n\n\nCharvi Mendiratta (5):\n  t7101,t7102,t7201: modernize test formatting\n  t7102,t7201: remove unnecessary blank spaces in test body\n  t7102,t7201: remove whitespace after redirect operator\n  t7201: use 'git -C' to avoid subshell\n  t7201: put each command on a separate line\n\n t/t7101-reset-empty-subdirs.sh |  66 ++++++++++-----------\n t/t7102-reset.sh               |  65 ++++++++-------------\n t/t7201-co.sh                  | 102 +++++++++++++--------------------\n 3 files changed, 97 insertions(+), 136 deletions(-)\n\n-- \n2.29.0.rc1\n\n"},{"id":"408149","messageId":"20201022071649.24284-2-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201021124823.2217-1-charvi077@gmail.com","subject":"[PATCH v6 1/5][Outreachy] t7101,t7102,t7201: modernize test formatting","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-22T07:16:46Z","receivedAt":"2020-10-22T07:19:48Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Some tests in these scripts are formatted using a very old style:\n        test_expect_success \\\n            'title' \\\n            'body line 1 &&\n             body line 2'\n\nUpdating the formatting to the modern style:\n        test_expect_success 'title' '\n            body line 1 &&\n            body line 2\n        '\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7101-reset-empty-subdirs.sh | 66 +++++++++++++++++-----------------\n t/t7102-reset.sh               | 24 +++++--------\n t/t7201-co.sh                  | 31 ++++++++--------\n 3 files changed, 56 insertions(+), 65 deletions(-)\n\ndiff --git a/t/t7101-reset-empty-subdirs.sh b/t/t7101-reset-empty-subdirs.sh\nindex 96e163f084..bfce05ac5d 100755\n--- a/t/t7101-reset-empty-subdirs.sh\n+++ b/t/t7101-reset-empty-subdirs.sh\n@@ -6,16 +6,15 @@\n test_description='git reset should cull empty subdirs'\n . ./test-lib.sh\n \n-test_expect_success \\\n-    'creating initial files' \\\n-    'mkdir path0 &&\n+test_expect_success 'creating initial files' '\n+     mkdir path0 &&\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-    'creating second files' \\\n-    'mkdir path1 &&\n+test_expect_success 'creating second files' '\n+     mkdir path1 &&\n      mkdir path1/path2 &&\n      cp \"$TEST_DIRECTORY\"/../COPYING path1/path2/COPYING &&\n      cp \"$TEST_DIRECTORY\"/../COPYING path1/COPYING &&\n@@ -25,39 +24,40 @@ test_expect_success \\\n      git add path1/COPYING &&\n      git add COPYING &&\n      git add path0/COPYING-TOO &&\n-     git commit -m change -a'\n+     git commit -m change -a\n+'\n \n-test_expect_success \\\n-    'resetting tree HEAD^' \\\n-    'git reset --hard HEAD^'\n+test_expect_success 'resetting tree HEAD^' '\n+     git reset --hard HEAD^\n+'\n \n-test_expect_success \\\n-    'checking initial files exist after rewind' \\\n-    'test -d path0 &&\n-     test -f path0/COPYING'\n+test_expect_success 'checking initial files exist after rewind' '\n+     test -d path0 &&\n+     test -f path0/COPYING\n+'\n \n-test_expect_success \\\n-    'checking lack of path1/path2/COPYING' \\\n-    '! test -f path1/path2/COPYING'\n+test_expect_success 'checking lack of path1/path2/COPYING' '\n+    ! test -f path1/path2/COPYING\n+'\n \n-test_expect_success \\\n-    'checking lack of path1/COPYING' \\\n-    '! test -f path1/COPYING'\n+test_expect_success 'checking lack of path1/COPYING' '\n+    ! test -f path1/COPYING\n+'\n \n-test_expect_success \\\n-    'checking lack of COPYING' \\\n-    '! test -f COPYING'\n+test_expect_success 'checking lack of COPYING' '\n+     ! test -f COPYING\n+'\n \n-test_expect_success \\\n-    'checking checking lack of path1/COPYING-TOO' \\\n-    '! test -f path0/COPYING-TOO'\n+test_expect_success 'checking checking lack of path1/COPYING-TOO' '\n+     ! test -f path0/COPYING-TOO\n+'\n \n-test_expect_success \\\n-    'checking lack of path1/path2' \\\n-    '! test -d path1/path2'\n+test_expect_success 'checking lack of path1/path2' '\n+     ! test -d path1/path2\n+'\n \n-test_expect_success \\\n-    'checking lack of path1' \\\n-    '! test -d path1'\n+test_expect_success 'checking lack of path1' '\n+     ! test -d path1\n+'\n \n test_done\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex 22161b3b2d..fe43f77513 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -107,8 +107,7 @@ test_expect_success 'reset --soft with unmerged index should fail' '\n \tgit rm --cached -- un\n '\n \n-test_expect_success \\\n-\t'giving paths with options different than --mixed should fail' '\n+test_expect_success 'giving paths with options different than --mixed should fail' '\n \ttest_must_fail git reset --soft -- first &&\n \ttest_must_fail git reset --hard -- first &&\n \ttest_must_fail git reset --soft HEAD^ -- first &&\n@@ -128,8 +127,7 @@ test_expect_success 'giving unrecognized options should fail' '\n \tcheck_changes $head5\n '\n \n-test_expect_success \\\n-\t'trying to do reset --soft with pending merge should fail' '\n+test_expect_success 'trying to do reset --soft with pending merge should fail' '\n \tgit branch branch1 &&\n \tgit branch branch2 &&\n \n@@ -152,8 +150,7 @@ test_expect_success \\\n \tcheck_changes $head5\n '\n \n-test_expect_success \\\n-\t'trying to do reset --soft with pending checkout merge should fail' '\n+test_expect_success 'trying to do reset --soft with pending checkout merge should fail' '\n \tgit branch branch3 &&\n \tgit branch branch4 &&\n \n@@ -175,8 +172,7 @@ test_expect_success \\\n \tcheck_changes $head5\n '\n \n-test_expect_success \\\n-\t'resetting to HEAD with no changes should succeed and do nothing' '\n+test_expect_success 'resetting to HEAD with no changes should succeed and do nothing' '\n \tgit reset --hard &&\n \t\tcheck_changes $head5 &&\n \tgit reset --hard HEAD &&\n@@ -226,8 +222,7 @@ secondfile:\n 2nd line 2nd file\n 3rd line 2nd file\n EOF\n-test_expect_success \\\n-\t'changing files and redo the last commit should succeed' '\n+test_expect_success 'changing files and redo the last commit should succeed' '\n \techo \"3rd line 2nd file\" >>secondfile &&\n \tgit commit -a -C ORIG_HEAD &&\n \thead4=$(git rev-parse --verify HEAD) &&\n@@ -245,8 +240,7 @@ first:\n second:\n 2nd file\n EOF\n-test_expect_success \\\n-\t'--hard reset should change the files and undo commits permanently' '\n+test_expect_success '--hard reset should change the files and undo commits permanently' '\n \tgit reset --hard HEAD~2 &&\n \tcheck_changes $head5p2 &&\n \ttest \"$(git rev-parse ORIG_HEAD)\" = \\\n@@ -284,8 +278,7 @@ secondfile:\n 1st line 2nd file\n 2nd line 2nd file\n EOF\n-test_expect_success \\\n-\t'redoing changes adding them without commit them should succeed' '\n+test_expect_success 'redoing changes adding them without commit them should succeed' '\n \tgit rm first &&\n \tgit mv second secondfile &&\n \n@@ -380,8 +373,7 @@ secondfile:\n 1st line 2nd file\n 2nd line 2nd file\n EOF\n-test_expect_success \\\n-\t'--hard reset to ORIG_HEAD should clear a fast-forward merge' '\n+test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge' '\n \tgit reset --hard HEAD^ &&\n \tcheck_changes $head5 &&\n \ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 4d62b9b00f..a800bda5e3 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -62,7 +62,7 @@ test_expect_success setup '\n \tgit checkout master\n '\n \n-test_expect_success \"checkout from non-existing branch\" '\n+test_expect_success 'checkout from non-existing branch' '\n \n \tgit checkout -b delete-me master &&\n \tgit update-ref -d --no-deref refs/heads/delete-me &&\n@@ -71,7 +71,7 @@ test_expect_success \"checkout from non-existing branch\" '\n \ttest refs/heads/master = \"$(git symbolic-ref HEAD)\"\n '\n \n-test_expect_success \"checkout with dirty tree without -m\" '\n+test_expect_success 'checkout with dirty tree without -m' '\n \n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n \tif git checkout side\n@@ -84,7 +84,7 @@ test_expect_success \"checkout with dirty tree without -m\" '\n \n '\n \n-test_expect_success \"checkout with unrelated dirty tree without -m\" '\n+test_expect_success 'checkout with unrelated dirty tree without -m' '\n \n \tgit checkout -f master &&\n \tfill 0 1 2 3 4 5 6 7 8 >same &&\n@@ -95,7 +95,7 @@ test_expect_success \"checkout with unrelated dirty tree without -m\" '\n \ttest_cmp messages.expect messages\n '\n \n-test_expect_success \"checkout -m with dirty tree\" '\n+test_expect_success 'checkout -m with dirty tree' '\n \n \tgit checkout -f master &&\n \tgit clean -f &&\n@@ -120,7 +120,7 @@ test_expect_success \"checkout -m with dirty tree\" '\n \ttest_must_be_empty current.index\n '\n \n-test_expect_success \"checkout -m with dirty tree, renamed\" '\n+test_expect_success 'checkout -m with dirty tree, renamed' '\n \n \tgit checkout -f master && git clean -f &&\n \n@@ -388,22 +388,22 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \n '\n \n-test_expect_success \\\n-    'checkout w/--track sets up tracking' '\n+test_expect_success 'checkout w/--track sets up tracking' '\n     git config branch.autosetupmerge false &&\n     git checkout master &&\n     git checkout --track -b track1 &&\n     test \"$(git config branch.track1.remote)\" &&\n-    test \"$(git config branch.track1.merge)\"'\n+    test \"$(git config branch.track1.merge)\"\n+'\n \n-test_expect_success \\\n-    'checkout w/autosetupmerge=always sets up tracking' '\n+test_expect_success 'checkout w/autosetupmerge=always sets up tracking' '\n     test_when_finished git config branch.autosetupmerge false &&\n     git config branch.autosetupmerge always &&\n     git checkout master &&\n     git checkout -b track2 &&\n     test \"$(git config branch.track2.remote)\" &&\n-    test \"$(git config branch.track2.merge)\"'\n+    test \"$(git config branch.track2.merge)\"\n+'\n \n test_expect_success 'checkout w/--track from non-branch HEAD fails' '\n     git checkout master^0 &&\n@@ -435,8 +435,7 @@ test_expect_success 'detach a symbolic link HEAD' '\n     test \"z$(git rev-parse --verify refs/heads/master)\" = \"z$here\"\n '\n \n-test_expect_success \\\n-    'checkout with --track fakes a sensible -b <name>' '\n+test_expect_success 'checkout with --track fakes a sensible -b <name>' '\n     git config remote.origin.fetch \"+refs/heads/*:refs/remotes/origin/*\" &&\n     git update-ref refs/remotes/origin/koala/bear renamer &&\n \n@@ -457,9 +456,9 @@ test_expect_success \\\n     test \"$(git rev-parse HEAD)\" = \"$(git rev-parse renamer)\"\n '\n \n-test_expect_success \\\n-    'checkout with --track, but without -b, fails with too short tracked name' '\n-    test_must_fail git checkout --track renamer'\n+test_expect_success 'checkout with --track, but without -b, fails with too short tracked name' '\n+    test_must_fail git checkout --track renamer\n+'\n \n setup_conflicting_index () {\n \trm -f .git/index &&\n-- \n2.29.0.rc1\n\n"},{"id":"408150","messageId":"20201022071649.24284-3-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201021124823.2217-1-charvi077@gmail.com","subject":"[PATCH v6 2/5][Outreachy] t7102,t7201: remove unnecessary blank spaces in test body","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-22T07:16:47Z","receivedAt":"2020-10-22T07:19:54Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"t7102 and t7201 still follow the old style of having blank\nlines around test body, which is not consistence with our\ncurrent practice.\n\nLet's remove those unnecessary blank lines.\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7102-reset.sh |  9 ---------\n t/t7201-co.sh    | 25 -------------------------\n 2 files changed, 34 deletions(-)\n\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex fe43f77513..2b4cfb2c83 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -439,7 +439,6 @@ test_expect_success 'test --mixed <paths>' '\n '\n \n test_expect_success 'test resetting the index at give paths' '\n-\n \tmkdir sub &&\n \t>sub/file1 &&\n \t>sub/file2 &&\n@@ -452,7 +451,6 @@ test_expect_success 'test resetting the index at give paths' '\n \techo \"$U\" &&\n \ttest_must_fail git diff-index --cached --exit-code \"$T\" &&\n \ttest \"$T\" != \"$U\"\n-\n '\n \n test_expect_success 'resetting an unmodified path is a no-op' '\n@@ -490,7 +488,6 @@ test_expect_success 'resetting specific path that is unmerged' '\n '\n \n test_expect_success 'disambiguation (1)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\n@@ -499,11 +496,9 @@ test_expect_success 'disambiguation (1)' '\n \ttest -z \"$(git diff --cached --name-only)\" &&\n \ttest -f secondfile &&\n \ttest_must_be_empty secondfile\n-\n '\n \n test_expect_success 'disambiguation (2)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\n@@ -511,11 +506,9 @@ test_expect_success 'disambiguation (2)' '\n \ttest_must_fail git reset secondfile &&\n \ttest -n \"$(git diff --cached --name-only -- secondfile)\" &&\n \ttest ! -f secondfile\n-\n '\n \n test_expect_success 'disambiguation (3)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\n@@ -524,11 +517,9 @@ test_expect_success 'disambiguation (3)' '\n \ttest_must_fail git diff --quiet &&\n \ttest -z \"$(git diff --cached --name-only)\" &&\n \ttest ! -f secondfile\n-\n '\n \n test_expect_success 'disambiguation (4)' '\n-\n \tgit reset --hard &&\n \t>secondfile &&\n \tgit add secondfile &&\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex a800bda5e3..b527f8009c 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -33,7 +33,6 @@ fill () {\n \n \n test_expect_success setup '\n-\n \tfill x y z > same &&\n \tfill 1 2 3 4 5 6 7 8 >one &&\n \tfill a b c d e >two &&\n@@ -63,7 +62,6 @@ test_expect_success setup '\n '\n \n test_expect_success 'checkout from non-existing branch' '\n-\n \tgit checkout -b delete-me master &&\n \tgit update-ref -d --no-deref refs/heads/delete-me &&\n \ttest refs/heads/delete-me = \"$(git symbolic-ref HEAD)\" &&\n@@ -72,7 +70,6 @@ test_expect_success 'checkout from non-existing branch' '\n '\n \n test_expect_success 'checkout with dirty tree without -m' '\n-\n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n \tif git checkout side\n \tthen\n@@ -81,11 +78,9 @@ test_expect_success 'checkout with dirty tree without -m' '\n \telse\n \t\techo \"happy - failed correctly\"\n \tfi\n-\n '\n \n test_expect_success 'checkout with unrelated dirty tree without -m' '\n-\n \tgit checkout -f master &&\n \tfill 0 1 2 3 4 5 6 7 8 >same &&\n \tcp same kept &&\n@@ -96,7 +91,6 @@ test_expect_success 'checkout with unrelated dirty tree without -m' '\n '\n \n test_expect_success 'checkout -m with dirty tree' '\n-\n \tgit checkout -f master &&\n \tgit clean -f &&\n \n@@ -121,7 +115,6 @@ test_expect_success 'checkout -m with dirty tree' '\n '\n \n test_expect_success 'checkout -m with dirty tree, renamed' '\n-\n \tgit checkout -f master && git clean -f &&\n \n \tfill 1 2 3 4 5 7 8 >one &&\n@@ -139,11 +132,9 @@ test_expect_success 'checkout -m with dirty tree, renamed' '\n \t! test -f one &&\n \tgit diff --cached >current &&\n \ttest_must_be_empty current\n-\n '\n \n test_expect_success 'checkout -m with merge conflict' '\n-\n \tgit checkout -f master && git clean -f &&\n \n \tfill 1 T 3 4 5 6 S 8 >one &&\n@@ -166,7 +157,6 @@ test_expect_success 'checkout -m with merge conflict' '\n '\n \n test_expect_success 'format of merge conflict from checkout -m' '\n-\n \tgit checkout -f master && git clean -f &&\n \n \tfill b d > two &&\n@@ -190,7 +180,6 @@ test_expect_success 'format of merge conflict from checkout -m' '\n '\n \n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n-\n \tgit checkout -f master && git reset --hard && git clean -f &&\n \n \tfill b d > two &&\n@@ -216,7 +205,6 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n '\n \n test_expect_success 'switch to another branch while carrying a deletion' '\n-\n \tgit checkout -f master && git reset --hard && git clean -f &&\n \tgit rm two &&\n \n@@ -228,7 +216,6 @@ test_expect_success 'switch to another branch while carrying a deletion' '\n '\n \n test_expect_success 'checkout to detach HEAD (with advice declined)' '\n-\n \tgit config advice.detachedHead false &&\n \trev=$(git rev-parse --short renamer^) &&\n \tgit checkout -f renamer && git clean -f &&\n@@ -267,7 +254,6 @@ test_expect_success 'checkout to detach HEAD' '\n '\n \n test_expect_success 'checkout to detach HEAD with branchname^' '\n-\n \tgit checkout -f master && git clean -f &&\n \tgit checkout renamer^ &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -283,7 +269,6 @@ test_expect_success 'checkout to detach HEAD with branchname^' '\n '\n \n test_expect_success 'checkout to detach HEAD with :/message' '\n-\n \tgit checkout -f master && git clean -f &&\n \tgit checkout \":/Initial\" &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -299,7 +284,6 @@ test_expect_success 'checkout to detach HEAD with :/message' '\n '\n \n test_expect_success 'checkout to detach HEAD with HEAD^0' '\n-\n \tgit checkout -f master && git clean -f &&\n \tgit checkout HEAD^0 &&\n \tH=$(git rev-parse --verify HEAD) &&\n@@ -315,7 +299,6 @@ test_expect_success 'checkout to detach HEAD with HEAD^0' '\n '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n-\n \tgit tag both side &&\n \tgit branch both master &&\n \tgit reset --hard &&\n@@ -327,11 +310,9 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \ttest \"z$H\" = \"z$M\" &&\n \tname=$(git symbolic-ref HEAD 2>/dev/null) &&\n \ttest \"z$name\" = zrefs/heads/both\n-\n '\n \n test_expect_success 'checkout with ambiguous tag/branch names' '\n-\n \tgit reset --hard &&\n \tgit checkout master &&\n \n@@ -351,11 +332,9 @@ test_expect_success 'checkout with ambiguous tag/branch names' '\n \telse\n \t\t: happy\n \tfi\n-\n '\n \n test_expect_success 'switch branches while in subdirectory' '\n-\n \tgit reset --hard &&\n \tgit checkout master &&\n \n@@ -366,11 +345,9 @@ test_expect_success 'switch branches while in subdirectory' '\n \t) &&\n \t! test -f subs/one &&\n \trm -fr subs\n-\n '\n \n test_expect_success 'checkout specific path while in subdirectory' '\n-\n \tgit reset --hard &&\n \tgit checkout side &&\n \tmkdir subs &&\n@@ -385,7 +362,6 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \t\tgit checkout side -- bero\n \t) &&\n \ttest -f subs/bero\n-\n '\n \n test_expect_success 'checkout w/--track sets up tracking' '\n@@ -608,7 +584,6 @@ test_expect_success 'failing checkout -b should not break working tree' '\n \ttest $(git symbolic-ref HEAD) = refs/heads/master &&\n \tgit diff --exit-code &&\n \tgit diff --cached --exit-code\n-\n '\n \n test_expect_success 'switch out of non-branch' '\n-- \n2.29.0.rc1\n\n"},{"id":"408151","messageId":"20201022071649.24284-4-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201021124823.2217-1-charvi077@gmail.com","subject":"[PATCH v6 3/5][Outreachy] t7102,t7201: remove whitespace after redirect operator","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-22T07:16:48Z","receivedAt":"2020-10-22T07:20:00Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"According to Documentation/CodingGuidelines, redirect\noperator is written with space before, but no space\nafter them.\n\nLet's remove these whitespaces after redirect operators.\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7102-reset.sh | 32 ++++++++++++++++----------------\n t/t7201-co.sh    | 10 +++++-----\n 2 files changed, 21 insertions(+), 21 deletions(-)\n\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex 2b4cfb2c83..3d190cad0e 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -70,15 +70,15 @@ check_changes () {\n \n test_expect_success 'reset --hard message' '\n \thex=$(git log -1 --format=\"%h\") &&\n-\tgit reset --hard > .actual &&\n-\techo HEAD is now at $hex $(commit_msg) > .expected &&\n+\tgit reset --hard >.actual &&\n+\techo HEAD is now at $hex $(commit_msg) >.expected &&\n \ttest_i18ncmp .expected .actual\n '\n \n test_expect_success 'reset --hard message (ISO8859-1 logoutputencoding)' '\n \thex=$(git log -1 --format=\"%h\") &&\n-\tgit -c \"i18n.logOutputEncoding=$test_encoding\" reset --hard > .actual &&\n-\techo HEAD is now at $hex $(commit_msg $test_encoding) > .expected &&\n+\tgit -c \"i18n.logOutputEncoding=$test_encoding\" reset --hard >.actual &&\n+\techo HEAD is now at $hex $(commit_msg $test_encoding) >.expected &&\n \ttest_i18ncmp .expected .actual\n '\n \n@@ -387,25 +387,25 @@ test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge\n '\n \n test_expect_success 'test --mixed <paths>' '\n-\techo 1 > file1 &&\n-\techo 2 > file2 &&\n+\techo 1 >file1 &&\n+\techo 2 >file2 &&\n \tgit add file1 file2 &&\n \ttest_tick &&\n \tgit commit -m files &&\n \tbefore1=$(git rev-parse --short HEAD:file1) &&\n \tbefore2=$(git rev-parse --short HEAD:file2) &&\n \tgit rm file2 &&\n-\techo 3 > file3 &&\n-\techo 4 > file4 &&\n-\techo 5 > file1 &&\n+\techo 3 >file3 &&\n+\techo 4 >file4 &&\n+\techo 5 >file1 &&\n \tafter1=$(git rev-parse --short $(git hash-object file1)) &&\n \tafter4=$(git rev-parse --short $(git hash-object file4)) &&\n \tgit add file1 file3 file4 &&\n \tgit reset HEAD -- file1 file2 file3 &&\n \ttest_must_fail git diff --quiet &&\n-\tgit diff > output &&\n+\tgit diff >output &&\n \n-\tcat > expect <<-EOF &&\n+\tcat >expect <<-EOF &&\n \tdiff --git a/file1 b/file1\n \tindex $before1..$after1 100644\n \t--- a/file1\n@@ -423,9 +423,9 @@ test_expect_success 'test --mixed <paths>' '\n \tEOF\n \n \ttest_cmp expect output &&\n-\tgit diff --cached > output &&\n+\tgit diff --cached >output &&\n \n-\tcat > cached_expect <<-EOF &&\n+\tcat >cached_expect <<-EOF &&\n \tdiff --git a/file4 b/file4\n \tnew file mode 100644\n \tindex 0000000..$after4\n@@ -460,14 +460,14 @@ test_expect_success 'resetting an unmodified path is a no-op' '\n \tgit diff-index --cached --exit-code HEAD\n '\n \n-cat > expect << EOF\n+cat >expect <<EOF\n Unstaged changes after reset:\n M\tfile2\n EOF\n \n test_expect_success '--mixed refreshes the index' '\n-\techo 123 >> file2 &&\n-\tgit reset --mixed HEAD > output &&\n+\techo 123 >>file2 &&\n+\tgit reset --mixed HEAD >output &&\n \ttest_i18ncmp expect output\n '\n \ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex b527f8009c..74553f991b 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -33,7 +33,7 @@ fill () {\n \n \n test_expect_success setup '\n-\tfill x y z > same &&\n+\tfill x y z >same &&\n \tfill 1 2 3 4 5 6 7 8 >one &&\n \tfill a b c d e >two &&\n \tgit add same one two &&\n@@ -55,7 +55,7 @@ test_expect_success setup '\n \n \tgit checkout -b simple master &&\n \trm -f one &&\n-\tfill a c e > two &&\n+\tfill a c e >two &&\n \tgit commit -a -m \"Simple D one, M two\" &&\n \n \tgit checkout master\n@@ -95,7 +95,7 @@ test_expect_success 'checkout -m with dirty tree' '\n \tgit clean -f &&\n \n \tfill 0 1 2 3 4 5 6 7 8 >one &&\n-\tgit checkout -m side > messages &&\n+\tgit checkout -m side >messages &&\n \n \ttest \"$(git symbolic-ref HEAD)\" = \"refs/heads/side\" &&\n \n@@ -159,7 +159,7 @@ test_expect_success 'checkout -m with merge conflict' '\n test_expect_success 'format of merge conflict from checkout -m' '\n \tgit checkout -f master && git clean -f &&\n \n-\tfill b d > two &&\n+\tfill b d >two &&\n \tgit checkout -m simple &&\n \n \tgit ls-files >current &&\n@@ -182,7 +182,7 @@ test_expect_success 'format of merge conflict from checkout -m' '\n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n \tgit checkout -f master && git reset --hard && git clean -f &&\n \n-\tfill b d > two &&\n+\tfill b d >two &&\n \tgit checkout --merge --conflict=diff3 simple &&\n \n \tcat <<-EOF >expect &&\n-- \n2.29.0.rc1\n\n"},{"id":"408152","messageId":"20201022071649.24284-5-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201021124823.2217-1-charvi077@gmail.com","subject":"[PATCH v6 4/5][Outreachy] t7201: use 'git -C' to avoid subshell","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-22T07:16:49Z","receivedAt":"2020-10-22T07:20:07Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7201-co.sh | 10 ++--------\n 1 file changed, 2 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 74553f991b..5898182fd2 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -339,10 +339,7 @@ test_expect_success 'switch branches while in subdirectory' '\n \tgit checkout master &&\n \n \tmkdir subs &&\n-\t(\n-\t\tcd subs &&\n-\t\tgit checkout side\n-\t) &&\n+\tgit -C subs checkout side &&\n \t! test -f subs/one &&\n \trm -fr subs\n '\n@@ -357,10 +354,7 @@ test_expect_success 'checkout specific path while in subdirectory' '\n \n \tgit checkout master &&\n \tmkdir -p subs &&\n-\t(\n-\t\tcd subs &&\n-\t\tgit checkout side -- bero\n-\t) &&\n+\tgit -C subs checkout side -- bero &&\n \ttest -f subs/bero\n '\n \n-- \n2.29.0.rc1\n\n"},{"id":"408153","messageId":"20201022071649.24284-6-charvi077@gmail.com","threadId":"54430","inReplyTo":"20201021124823.2217-1-charvi077@gmail.com","subject":"[PATCH v6 5/5][Outreachy] t7201: put each command on a separate line","fromName":"Charvi Mendiratta","fromEmail":"charvi077@gmail.com","sentAt":"2020-10-22T07:16:50Z","receivedAt":"2020-10-22T07:20:12Z","isPatch":true,"sender":{"key":"charvi077@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32788121?v=4"},"body":"Modern practice is to avoid multiple commands per line,\nand instead place each command on its own line.\n\nSigned-off-by: Charvi Mendiratta <charvi077@gmail.com>\n---\n t/t7201-co.sh | 26 ++++++++++++++++++--------\n 1 file changed, 18 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 5898182fd2..b36a93056f 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -157,7 +157,8 @@ test_expect_success 'checkout -m with merge conflict' '\n '\n \n test_expect_success 'format of merge conflict from checkout -m' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \n \tfill b d >two &&\n \tgit checkout -m simple &&\n@@ -180,7 +181,9 @@ test_expect_success 'format of merge conflict from checkout -m' '\n '\n \n test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n-\tgit checkout -f master && git reset --hard && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit reset --hard &&\n+\tgit clean -f &&\n \n \tfill b d >two &&\n \tgit checkout --merge --conflict=diff3 simple &&\n@@ -205,7 +208,9 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '\n '\n \n test_expect_success 'switch to another branch while carrying a deletion' '\n-\tgit checkout -f master && git reset --hard && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit reset --hard &&\n+\tgit clean -f &&\n \tgit rm two &&\n \n \ttest_must_fail git checkout simple 2>errs &&\n@@ -218,7 +223,8 @@ test_expect_success 'switch to another branch while carrying a deletion' '\n test_expect_success 'checkout to detach HEAD (with advice declined)' '\n \tgit config advice.detachedHead false &&\n \trev=$(git rev-parse --short renamer^) &&\n-\tgit checkout -f renamer && git clean -f &&\n+\tgit checkout -f renamer &&\n+\tgit clean -f &&\n \tgit checkout renamer^ 2>messages &&\n \ttest_i18ngrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count = 1 messages &&\n@@ -237,7 +243,8 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '\n test_expect_success 'checkout to detach HEAD' '\n \tgit config advice.detachedHead true &&\n \trev=$(git rev-parse --short renamer^) &&\n-\tgit checkout -f renamer && git clean -f &&\n+\tgit checkout -f renamer &&\n+\tgit clean -f &&\n \tGIT_TEST_GETTEXT_POISON=false git checkout renamer^ 2>messages &&\n \tgrep \"HEAD is now at $rev\" messages &&\n \ttest_line_count -gt 1 messages &&\n@@ -254,7 +261,8 @@ test_expect_success 'checkout to detach HEAD' '\n '\n \n test_expect_success 'checkout to detach HEAD with branchname^' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout renamer^ &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n@@ -269,7 +277,8 @@ test_expect_success 'checkout to detach HEAD with branchname^' '\n '\n \n test_expect_success 'checkout to detach HEAD with :/message' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout \":/Initial\" &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n@@ -284,7 +293,8 @@ test_expect_success 'checkout to detach HEAD with :/message' '\n '\n \n test_expect_success 'checkout to detach HEAD with HEAD^0' '\n-\tgit checkout -f master && git clean -f &&\n+\tgit checkout -f master &&\n+\tgit clean -f &&\n \tgit checkout HEAD^0 &&\n \tH=$(git rev-parse --verify HEAD) &&\n \tM=$(git show-ref -s --verify refs/heads/master) &&\n-- \n2.29.0.rc1\n\n"},{"id":"408177","messageId":"xmqqmu0emaev.fsf@gitster.c.googlers.com","threadId":"54430","inReplyTo":"CAPig+cSL-9o=c=iYtvHNDZmtRVoy2=EED1RdoX2Tsjnm3ioevQ@mail.gmail.com","subject":"Re: [PATCH v5 3/5][Outreachy] t7102,t7201: remove whitespace after redirect operator","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-22T17:35:04Z","receivedAt":"2020-10-22T17:35:12Z","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 Thu, Oct 22, 2020 at 1:56 AM Junio C Hamano <gitster@pobox.com> wrote:\n>> Subject: t7102: prepare expected output inside test_expect_* block\n>>\n>> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n>> ---\n>> diff --git c/t/t7102-reset.sh w/t/t7102-reset.sh\n>> @@ -82,15 +82,15 @@ test_expect_success 'reset --hard message (ISO8859-1 logoutputencoding)' '\n>> ->.diff_expect\n>> ->.cached_expect\n>> -cat >.cat_expect <<EOF\n>> -secondfile:\n>> -EOF\n>> -\n>>  test_expect_success 'giving a non existing revision should fail' '\n>> +       >.diff_expect &&\n>> +       >.cached_expect &&\n>> +       cat >.cat_expect <<-\\EOF &&\n>> +       secondfile:\n>> +       EOF\n>\n> You used <<-\\EOF rather than plain <<-EOF when possible. Good.\n>\n> (Might be worth mention in the commit message, but perhaps too minor?)\n>\n>> @@ -191,38 +191,38 @@ test_expect_success 'resetting to HEAD with no changes should succeed and do not\n>>  test_expect_success '--soft reset only should show changes in diff --cached' '\n>> +       >.diff_expect &&\n>> +       cat >.cached_expect <<-EOF &&\n>> +       diff --git a/secondfile b/secondfile\n>> +       index $head5p1s..$head5s 100644\n>\n> And used plain <<-EOF when necessary. Fine.\n\nYup.\n\nLet's declare victory with v5 plus this one as [patch 6/5], and move\non.\n\nWe both know very well that through the microproject that it has\nbeen demonstrated that Charvi can now comfortably work with us in\nthe review discussions.\n\nThanks, both.\n"}]}