From: Trieu Huynh Date: Sat, 28 Mar 2026 20:02:50 GMT Subject: [GSoC PATCH 11/16] t3903: avoid suppressing git's exit code Message-ID: <20260328200255.247759-12-vikingtc4@gmail.com> In-Reply-To: <20260328200255.247759-1-vikingtc4@gmail.com> Update t3903-stash.sh to redirect git-cmds output to a temporary file instead of piping it directly to not hide the exit code of git commands behind pipes, as a crash in git might go unnoticed. Signed-off-by: Trieu Huynh --- t/t3903-stash.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index 70879941c2..b67cf23fbb 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@ -962,7 +962,8 @@ test_expect_success 'store updates stash ref and reflog' ' test_path_is_missing bazzy && git stash store -m quuxery $STASH_ID && test $(git rev-parse stash) = $STASH_ID && - git reflog --format=%H stash| grep $STASH_ID && + git reflog --format=%H stash >actual && + test_grep "$STASH_ID" actual && git stash pop && grep quux bazzy ' @@ -976,7 +977,7 @@ test_expect_success 'handle stash specification with spaces' ' echo cow >file && git stash && git stash apply "stash@{$stamp}" && - grep pig file + test_grep pig file ' test_expect_success 'setup stash with index and worktree changes' ' -- 2.43.0