From: D. Ben Knoble Date: Mon, 22 Sep 2025 01:39:03 GMT Subject: [PATCH v3 1/4] t3903: reduce dependencies on previous tests Message-ID: <1328eb8eac65ec7bbf1f3cb257d7221a372c45c3.1758505011.git.ben.knoble+github@gmail.com> In-Reply-To: Skipping previous tests to work through only failing tests with arguments like --run=4,122- causes some tests to fail because subdir doesn't exist yet (it is created by a previous test; typically "unstashing in a subdirectory"). Create it on demand for tests that need it, but don't fail (-p) if the directory already exists. Signed-off-by: D. Ben Knoble --- t/t3903-stash.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index 74666ff3e4..b8936a653b 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@ -895,6 +895,7 @@ setup_stash() test_expect_success 'apply: show same status as git status (relative to ./)' ' git stash clear && + mkdir -p subdir && echo 1 >subdir/subfile1 && echo 2 >subdir/subfile2 && git add subdir/subfile1 && @@ -1327,6 +1328,7 @@ setup_stash() test_expect_success 'stash -- leaves untracked files in subdir intact' ' git reset && + mkdir -p subdir && >subdir/untracked && >subdir/tracked1 && >subdir/tracked2 && @@ -1343,6 +1345,7 @@ setup_stash() test_expect_success 'stash -- works with binary files' ' git reset && + mkdir -p subdir && >subdir/untracked && >subdir/tracked && cp "$TEST_DIRECTORY"/test-binary-1.png subdir/tracked-binary && -- 2.48.1