{"thread":{"id":"65374","subject":"[GSoC PATCH 1/2] t8003: avoid suppressing git's exit code","startedAt":"2026-03-28T13:30:03Z","lastAt":"2026-03-28T13:30:08Z","messageCount":2,"participants":["Trieu Huynh"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"540268","messageId":"20260328132955.172262-1-vikingtc4@gmail.com","threadId":"65374","inReplyTo":null,"subject":"[GSoC PATCH 1/2] t8003: avoid suppressing git's exit code","fromName":"Trieu Huynh","fromEmail":"vikingtc4@gmail.com","sentAt":"2026-03-28T13:29:54Z","receivedAt":"2026-03-28T13:30:03Z","isPatch":true,"body":"Update t8003-blame-corner-cases.sh to redirect git-blame output\nto a temporary file instead of piping it directly to not hide\nthe exit code of git commands behind pipes, as a crash in git\nmight go unnoticed.\n\nSigned-off-by: Trieu Huynh <vikingtc4@gmail.com>\n---\n t/t8003-blame-corner-cases.sh | 48 ++++++++++++++++++++++-------------\n 1 file changed, 31 insertions(+), 17 deletions(-)\n\ndiff --git a/t/t8003-blame-corner-cases.sh b/t/t8003-blame-corner-cases.sh\nindex 731265541a..17ed5af121 100755\n--- a/t/t8003-blame-corner-cases.sh\n+++ b/t/t8003-blame-corner-cases.sh\n@@ -50,67 +50,78 @@ test_expect_success setup '\n \n test_expect_success 'straight copy without -C' '\n \n-\tgit blame uno | grep Second\n+\tgit blame uno >actual &&\n+\ttest_grep Second actual\n \n '\n \n test_expect_success 'straight move without -C' '\n \n-\tgit blame dos | grep Initial\n+\tgit blame dos >actual &&\n+\ttest_grep Initial actual\n \n '\n \n test_expect_success 'straight copy with -C' '\n \n-\tgit blame -C1 uno | grep Second\n+\tgit blame -C1 uno >actual &&\n+\ttest_grep Second actual\n \n '\n \n test_expect_success 'straight move with -C' '\n \n-\tgit blame -C1 dos | grep Initial\n+\tgit blame -C1 dos >actual &&\n+\ttest_grep Initial actual\n \n '\n \n test_expect_success 'straight copy with -C -C' '\n \n-\tgit blame -C -C1 uno | grep Initial\n+\tgit blame -C -C1 uno >actual &&\n+\ttest_grep Initial actual\n \n '\n \n test_expect_success 'straight move with -C -C' '\n \n-\tgit blame -C -C1 dos | grep Initial\n+\tgit blame -C -C1 dos >actual &&\n+\ttest_grep Initial actual\n \n '\n \n test_expect_success 'append without -C' '\n \n-\tgit blame -L2 tres | grep Second\n+\tgit blame -L2 tres >actual &&\n+\ttest_grep Second actual\n \n '\n \n test_expect_success 'append with -C' '\n \n-\tgit blame -L2 -C1 tres | grep Second\n+\tgit blame -L2 -C1 tres >actual &&\n+\ttest_grep Second actual\n \n '\n \n test_expect_success 'append with -C -C' '\n \n-\tgit blame -L2 -C -C1 tres | grep Second\n+\tgit blame -L2 -C -C1 tres >actual &&\n+\ttest_grep Second actual\n \n '\n \n test_expect_success 'append with -C -C -C' '\n \n-\tgit blame -L2 -C -C -C1 tres | grep Initial\n+\tgit blame -L2 -C -C -C1 tres >actual &&\n+\ttest_grep Initial actual\n \n '\n \n test_expect_success 'blame wholesale copy' '\n \n-\tgit blame -f -C -C1 HEAD^ -- cow | sed -e \"$pick_fc\" >current &&\n+\tgit blame -f -C -C1 HEAD^ -- cow >actual &&\n+\tsed -e \"$pick_fc\" actual >current &&\n \tcat >expected <<-\\EOF &&\n \tmouse-Initial\n \tmouse-Second\n@@ -122,7 +133,8 @@ test_expect_success 'blame wholesale copy' '\n \n test_expect_success 'blame wholesale copy and more' '\n \n-\tgit blame -f -C -C1 HEAD -- cow | sed -e \"$pick_fc\" >current &&\n+\tgit blame -f -C -C1 HEAD -- cow >actual &&\n+\tsed -e \"$pick_fc\" actual >current &&\n \tcat >expected <<-\\EOF &&\n \tmouse-Initial\n \tmouse-Second\n@@ -144,7 +156,8 @@ test_expect_success 'blame wholesale copy and more in the index' '\n \tEOF\n \tgit add horse &&\n \ttest_when_finished \"git rm -f horse\" &&\n-\tgit blame -f -C -C1 -- horse | sed -e \"$pick_fc\" >current &&\n+\tgit blame -f -C -C1 -- horse >actual &&\n+\tsed -e \"$pick_fc\" actual >current &&\n \tcat >expected <<-\\EOF &&\n \tmouse-Initial\n \tmouse-Second\n@@ -168,7 +181,8 @@ test_expect_success 'blame during cherry-pick with file rename conflict' '\n \t(git cherry-pick HEAD@{1} || test $? -eq 1) &&\n \tgit show HEAD@{1}:rodent > rodent &&\n \tgit add rodent &&\n-\tgit blame -f -C -C1 rodent | sed -e \"$pick_fc\" >current &&\n+\tgit blame -f -C -C1 rodent >actual &&\n+\tsed -e \"$pick_fc\" actual >current &&\n \tcat >expected <<-\\EOF &&\n \tmouse-Initial\n \tmouse-Second\n@@ -246,14 +260,14 @@ test_expect_success 'setup file with CRLF newlines' '\n test_expect_success 'blame file with CRLF core.autocrlf true' '\n \tgit config core.autocrlf true &&\n \tgit blame crlffile >actual &&\n-\tgrep \"A U Thor\" actual\n+\ttest_grep \"A U Thor\" actual\n '\n \n test_expect_success 'blame file with CRLF attributes text' '\n \tgit config core.autocrlf false &&\n \techo \"crlffile text\" >.gitattributes &&\n \tgit blame crlffile >actual &&\n-\tgrep \"A U Thor\" actual\n+\ttest_grep \"A U Thor\" actual\n '\n \n test_expect_success 'blame file with CRLF core.autocrlf=true' '\n@@ -267,7 +281,7 @@ test_expect_success 'blame file with CRLF core.autocrlf=true' '\n \tgit checkout crlfinrepo &&\n \trm tmp &&\n \tgit blame crlfinrepo >actual &&\n-\tgrep \"A U Thor\" actual\n+\ttest_grep \"A U Thor\" actual\n '\n \n test_expect_success 'setup coalesce tests' '\n-- \n2.43.0\n\n"},{"id":"540269","messageId":"20260328132955.172262-2-vikingtc4@gmail.com","threadId":"65374","inReplyTo":"20260328132955.172262-1-vikingtc4@gmail.com","subject":"[GSoC PATCH 2/2] t8003: modernise style","fromName":"Trieu Huynh","fromEmail":"vikingtc4@gmail.com","sentAt":"2026-03-28T13:29:55Z","receivedAt":"2026-03-28T13:30:08Z","isPatch":true,"body":"Remove the blank lines at both ends of each test_expect_success body\nto match the modern style used elsewhere in the test suite.\n\nSigned-off-by: Trieu Huynh <vikingtc4@gmail.com>\n---\n t/t8003-blame-corner-cases.sh | 27 ---------------------------\n 1 file changed, 27 deletions(-)\n\ndiff --git a/t/t8003-blame-corner-cases.sh b/t/t8003-blame-corner-cases.sh\nindex 17ed5af121..30e7960ace 100755\n--- a/t/t8003-blame-corner-cases.sh\n+++ b/t/t8003-blame-corner-cases.sh\n@@ -49,77 +49,56 @@ test_expect_success setup '\n '\n \n test_expect_success 'straight copy without -C' '\n-\n \tgit blame uno >actual &&\n \ttest_grep Second actual\n-\n '\n \n test_expect_success 'straight move without -C' '\n-\n \tgit blame dos >actual &&\n \ttest_grep Initial actual\n-\n '\n \n test_expect_success 'straight copy with -C' '\n-\n \tgit blame -C1 uno >actual &&\n \ttest_grep Second actual\n-\n '\n \n test_expect_success 'straight move with -C' '\n-\n \tgit blame -C1 dos >actual &&\n \ttest_grep Initial actual\n-\n '\n \n test_expect_success 'straight copy with -C -C' '\n-\n \tgit blame -C -C1 uno >actual &&\n \ttest_grep Initial actual\n-\n '\n \n test_expect_success 'straight move with -C -C' '\n-\n \tgit blame -C -C1 dos >actual &&\n \ttest_grep Initial actual\n-\n '\n \n test_expect_success 'append without -C' '\n-\n \tgit blame -L2 tres >actual &&\n \ttest_grep Second actual\n-\n '\n \n test_expect_success 'append with -C' '\n-\n \tgit blame -L2 -C1 tres >actual &&\n \ttest_grep Second actual\n-\n '\n \n test_expect_success 'append with -C -C' '\n-\n \tgit blame -L2 -C -C1 tres >actual &&\n \ttest_grep Second actual\n-\n '\n \n test_expect_success 'append with -C -C -C' '\n-\n \tgit blame -L2 -C -C -C1 tres >actual &&\n \ttest_grep Initial actual\n-\n '\n \n test_expect_success 'blame wholesale copy' '\n-\n \tgit blame -f -C -C1 HEAD^ -- cow >actual &&\n \tsed -e \"$pick_fc\" actual >current &&\n \tcat >expected <<-\\EOF &&\n@@ -128,11 +107,9 @@ test_expect_success 'blame wholesale copy' '\n \tmouse-Third\n \tEOF\n \ttest_cmp expected current\n-\n '\n \n test_expect_success 'blame wholesale copy and more' '\n-\n \tgit blame -f -C -C1 HEAD -- cow >actual &&\n \tsed -e \"$pick_fc\" actual >current &&\n \tcat >expected <<-\\EOF &&\n@@ -142,11 +119,9 @@ test_expect_success 'blame wholesale copy and more' '\n \tmouse-Third\n \tEOF\n \ttest_cmp expected current\n-\n '\n \n test_expect_success 'blame wholesale copy and more in the index' '\n-\n \tcat >horse <<-\\EOF &&\n \tABC\n \tDEF\n@@ -166,11 +141,9 @@ test_expect_success 'blame wholesale copy and more in the index' '\n \tmouse-Third\n \tEOF\n \ttest_cmp expected current\n-\n '\n \n test_expect_success 'blame during cherry-pick with file rename conflict' '\n-\n \ttest_when_finished \"git reset --hard && git checkout main\" &&\n \tgit checkout HEAD~3 &&\n \techo MOUSE >> mouse &&\n-- \n2.43.0\n\n"}]}