From ac7c0a3ab5ccf486f789ca09369316750e00108c Mon Sep 17 00:00:00 2001 From: Md Ferdous Alam Date: Tue, 24 Feb 2026 00:43:20 +0600 Subject: [PATCH] t0050: use explicit branch name and verify checkout result The test 'checkout with no pathspec and a case insensitive fs' relies on the script-wide GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME to set the initial branch to 'main'. Use 'git init -b main' instead, so that the test is self-contained and does not depend on the blanket setting for the entire script. While at it, add a test_path_is_file check after the checkout to verify that the expected file is present in the worktree. Signed-off-by: Md Ferdous Alam --- t/t0050-filesystem.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh index ca8568067d31d6..f1a90a290e61d2 100755 --- a/t/t0050-filesystem.sh +++ b/t/t0050-filesystem.sh @@ -118,7 +118,7 @@ $test_unicode 'merge (silent unicode normalization)' ' ' test_expect_success CASE_INSENSITIVE_FS 'checkout with no pathspec and a case insensitive fs' ' - git init repo && + git init -b main repo && ( cd repo && @@ -133,7 +133,8 @@ test_expect_success CASE_INSENSITIVE_FS 'checkout with no pathspec and a case in git add gitweb && git commit -m "add gitweb/subdir/file" && - git checkout main + git checkout main && + test_path_is_file Gitweb ) '