git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v6 3/5][Outreachy] t7102,t7201: remove whitespace after redirect operator

From
Charvi Mendiratta <charvi077@gmail.com>
Date
Oct 22, 2020, 07:16 UTC
Message-ID
<20201022071649.24284-4-charvi077@gmail.com>
In-Reply-To
<20201021124823.2217-1-charvi077@gmail.com>

According to Documentation/CodingGuidelines, redirect operator is written with space before, but no space after them.

Let's remove these whitespaces after redirect operators.
Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>
---
 t/t7102-reset.sh | 32 ++++++++++++++++----------------
 t/t7201-co.sh    | 10 +++++-----
 2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh
index 2b4cfb2c83..3d190cad0e 100755
--- a/t/t7102-reset.sh
+++ b/t/t7102-reset.sh
@@ -70,15 +70,15 @@ check_changes () {
 
 test_expect_success 'reset --hard message' '
 	hex=$(git log -1 --format="%h") &&
-	git reset --hard > .actual &&
-	echo HEAD is now at $hex $(commit_msg) > .expected &&
+	git reset --hard >.actual &&
+	echo HEAD is now at $hex $(commit_msg) >.expected &&
 	test_i18ncmp .expected .actual
 '
 
 test_expect_success 'reset --hard message (ISO8859-1 logoutputencoding)' '
 	hex=$(git log -1 --format="%h") &&
-	git -c "i18n.logOutputEncoding=$test_encoding" reset --hard > .actual &&
-	echo HEAD is now at $hex $(commit_msg $test_encoding) > .expected &&
+	git -c "i18n.logOutputEncoding=$test_encoding" reset --hard >.actual &&
+	echo HEAD is now at $hex $(commit_msg $test_encoding) >.expected &&
 	test_i18ncmp .expected .actual
 '
 
@@ -387,25 +387,25 @@ test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge
 '
 
 test_expect_success 'test --mixed <paths>' '
-	echo 1 > file1 &&
-	echo 2 > file2 &&
+	echo 1 >file1 &&
+	echo 2 >file2 &&
 	git add file1 file2 &&
 	test_tick &&
 	git commit -m files &&
 	before1=$(git rev-parse --short HEAD:file1) &&
 	before2=$(git rev-parse --short HEAD:file2) &&
 	git rm file2 &&
-	echo 3 > file3 &&
-	echo 4 > file4 &&
-	echo 5 > file1 &&
+	echo 3 >file3 &&
+	echo 4 >file4 &&
+	echo 5 >file1 &&
 	after1=$(git rev-parse --short $(git hash-object file1)) &&
 	after4=$(git rev-parse --short $(git hash-object file4)) &&
 	git add file1 file3 file4 &&
 	git reset HEAD -- file1 file2 file3 &&
 	test_must_fail git diff --quiet &&
-	git diff > output &&
+	git diff >output &&
 
-	cat > expect <<-EOF &&
+	cat >expect <<-EOF &&
 	diff --git a/file1 b/file1
 	index $before1..$after1 100644
 	--- a/file1
@@ -423,9 +423,9 @@ test_expect_success 'test --mixed <paths>' '
 	EOF
 
 	test_cmp expect output &&
-	git diff --cached > output &&
+	git diff --cached >output &&
 
-	cat > cached_expect <<-EOF &&
+	cat >cached_expect <<-EOF &&
 	diff --git a/file4 b/file4
 	new file mode 100644
 	index 0000000..$after4
@@ -460,14 +460,14 @@ test_expect_success 'resetting an unmodified path is a no-op' '
 	git diff-index --cached --exit-code HEAD
 '
 
-cat > expect << EOF
+cat >expect <<EOF
 Unstaged changes after reset:
 M	file2
 EOF
 
 test_expect_success '--mixed refreshes the index' '
-	echo 123 >> file2 &&
-	git reset --mixed HEAD > output &&
+	echo 123 >>file2 &&
+	git reset --mixed HEAD >output &&
 	test_i18ncmp expect output
 '
 
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index b527f8009c..74553f991b 100755
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
@@ -33,7 +33,7 @@ fill () {
 
 
 test_expect_success setup '
-	fill x y z > same &&
+	fill x y z >same &&
 	fill 1 2 3 4 5 6 7 8 >one &&
 	fill a b c d e >two &&
 	git add same one two &&
@@ -55,7 +55,7 @@ test_expect_success setup '
 
 	git checkout -b simple master &&
 	rm -f one &&
-	fill a c e > two &&
+	fill a c e >two &&
 	git commit -a -m "Simple D one, M two" &&
 
 	git checkout master
@@ -95,7 +95,7 @@ test_expect_success 'checkout -m with dirty tree' '
 	git clean -f &&
 
 	fill 0 1 2 3 4 5 6 7 8 >one &&
-	git checkout -m side > messages &&
+	git checkout -m side >messages &&
 
 	test "$(git symbolic-ref HEAD)" = "refs/heads/side" &&
 
@@ -159,7 +159,7 @@ test_expect_success 'checkout -m with merge conflict' '
 test_expect_success 'format of merge conflict from checkout -m' '
 	git checkout -f master && git clean -f &&
 
-	fill b d > two &&
+	fill b d >two &&
 	git checkout -m simple &&
 
 	git ls-files >current &&
@@ -182,7 +182,7 @@ test_expect_success 'format of merge conflict from checkout -m' '
 test_expect_success 'checkout --merge --conflict=diff3 <branch>' '
 	git checkout -f master && git reset --hard && git clean -f &&
 
-	fill b d > two &&
+	fill b d >two &&
 	git checkout --merge --conflict=diff3 simple &&
 
 	cat <<-EOF >expect &&
-- 
2.29.0.rc1
Previous: Charvi MendirattaNext: Charvi Mendiratta
Message 58 of 60 in “[Outreachy] modernizing the test scripts”
  1. 0/5 [Outreachy] modernizing the test scriptscharvi-077, Oct 15, 2020
  2. 1/5 [Outreachy] t7101,t7102,t7201: modernize test formattingcharvi-077, Oct 15, 2020
  3. Christian CouderOct 16, 2020
  4. 2/5 [Outreachy] t7102,t7201: remove unnecessary blank spaces in test bodycharvi-077, Oct 15, 2020
  5. 3/5 [Outreachy] t7102,t7201: remove whitespace after redirect operatorcharvi-077, Oct 15, 2020
  6. 4/5 [Outreachy] t7201: avoid using cd outside of subshellscharvi-077, Oct 15, 2020
  7. 5/5 [Outreachy] t7201: place each command in its own linecharvi-077, Oct 15, 2020
  8. Christian CouderOct 16, 2020
  9. Charvi MendirattaOct 17, 2020
  10. 0/5 [Outreachy] modernizing the test scriptsCharvi Mendiratta, Oct 17, 2020
  11. 1/5 [Outreachy] t7101,t7102,t7201: modernize test formattingCharvi Mendiratta, Oct 17, 2020
  12. 2/5 [Outreachy] t7102,t7201: remove unnecessary blank spaces in test bodyCharvi Mendiratta, Oct 17, 2020
  13. Đoàn Trần Công DanhOct 17, 2020
  14. Charvi MendirattaOct 18, 2020
  15. 3/5 [Outreachy] t7102,t7201: remove whitespace after redirect operatorCharvi Mendiratta, Oct 17, 2020
  16. 4/5 [Outreachy] t7201: avoid using cd outside of subshellsCharvi Mendiratta, Oct 17, 2020
  17. Phillip WoodOct 18, 2020
  18. Charvi MendirattaOct 19, 2020
  19. Phillip WoodOct 19, 2020
  20. Charvi MendirattaOct 19, 2020
  21. Taylor BlauOct 19, 2020
  22. Charvi MendirattaOct 20, 2020
  23. Taylor BlauOct 20, 2020
  24. Phillip WoodOct 20, 2020
  25. Charvi MendirattaOct 20, 2020
  26. 5/5 [Outreachy] t7201: place each command in its own lineCharvi Mendiratta, Oct 17, 2020
  27. 0/5 [Outreachy] modernize the test scriptsCharvi Mendiratta, Oct 20, 2020
  28. 1/5 [Outreachy] t7101,t7102,t7201: modernize test formattingCharvi Mendiratta, Oct 20, 2020
  29. 2/5 [Outreachy] t7102,t7201: remove unnecessary blank spaces in test bodyCharvi Mendiratta, Oct 20, 2020
  30. 3/5 [Outreachy] t7102,t7201: remove whitespace after redirect operatorCharvi Mendiratta, Oct 20, 2020
  31. 4/5 [Outreachy] t7201: use 'git -C' to avoid subshellCharvi Mendiratta, Oct 20, 2020
  32. 5/5 [Outreachy] t7201: put each command on a seperate lineCharvi Mendiratta, Oct 20, 2020
  33. t7201: put each command on a separate lineCharvi Mendiratta, Oct 20, 2020
  34. Junio C HamanoOct 20, 2020
  35. Taylor BlauOct 20, 2020
  36. Junio C HamanoOct 20, 2020
  37. Taylor BlauOct 20, 2020
  38. Junio C HamanoOct 20, 2020
  39. Charvi MendirattaOct 21, 2020
  40. Junio C HamanoOct 20, 2020
  41. Charvi MendirattaOct 21, 2020
  42. 0/5 [Outreachy] modernize the test scriptsCharvi Mendiratta, Oct 21, 2020
  43. 1/5 [Outreachy] t7101,t7102,t7201: modernize test formattingCharvi Mendiratta, Oct 21, 2020
  44. 2/5 [Outreachy] t7102,t7201: remove unnecessary blank spaces in test bodyCharvi Mendiratta, Oct 21, 2020
  45. 3/5 [Outreachy] t7102,t7201: remove whitespace after redirect operatorCharvi Mendiratta, Oct 21, 2020
  46. Eric SunshineOct 21, 2020
  47. Junio C HamanoOct 22, 2020
  48. Eric SunshineOct 22, 2020
  49. Junio C HamanoOct 22, 2020
  50. Eric SunshineOct 22, 2020
  51. Junio C HamanoOct 22, 2020
  52. Charvi MendirattaOct 22, 2020
  53. 4/5 [Outreachy] t7201: use 'git -C' to avoid subshellCharvi Mendiratta, Oct 21, 2020
  54. 5/5 [Outreachy] t7201: put each command on a separate lineCharvi Mendiratta, Oct 21, 2020
  55. 0/5 [Outreachy] modernize test scriptsCharvi Mendiratta, Oct 22, 2020
  56. 1/5 [Outreachy] t7101,t7102,t7201: modernize test formattingCharvi Mendiratta, Oct 22, 2020
  57. 2/5 [Outreachy] t7102,t7201: remove unnecessary blank spaces in test bodyCharvi Mendiratta, Oct 22, 2020
  58. 3/5 [Outreachy] t7102,t7201: remove whitespace after redirect operatorCharvi Mendiratta, Oct 22, 2020
  59. 4/5 [Outreachy] t7201: use 'git -C' to avoid subshellCharvi Mendiratta, Oct 22, 2020
  60. 5/5 [Outreachy] t7201: put each command on a separate lineCharvi Mendiratta, Oct 22, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.