Git fork

t3903: reduce dependencies on previous tests

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 <ben.knoble+github@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

D. Ben Knoble and committed by
Junio C Hamano
80bc042b 1ee85f0e

+3
+3
t/t3903-stash.sh
··· 895 895 896 896 test_expect_success 'apply: show same status as git status (relative to ./)' ' 897 897 git stash clear && 898 + mkdir -p subdir && 898 899 echo 1 >subdir/subfile1 && 899 900 echo 2 >subdir/subfile2 && 900 901 git add subdir/subfile1 && ··· 1327 1328 1328 1329 test_expect_success 'stash -- <subdir> leaves untracked files in subdir intact' ' 1329 1330 git reset && 1331 + mkdir -p subdir && 1330 1332 >subdir/untracked && 1331 1333 >subdir/tracked1 && 1332 1334 >subdir/tracked2 && ··· 1343 1345 1344 1346 test_expect_success 'stash -- <subdir> works with binary files' ' 1345 1347 git reset && 1348 + mkdir -p subdir && 1346 1349 >subdir/untracked && 1347 1350 >subdir/tracked && 1348 1351 cp "$TEST_DIRECTORY"/test-binary-1.png subdir/tracked-binary &&