git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] t2018: move checkout case-insensitive test from t0050

From
MGMd Ferdous Alam via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 23, 2026, 09:03 UTC
Message-ID
<pull.2054.git.1771837399472.gitgitgadget@gmail.com>
From: mdferdousalam <mdferdousalam1989@yahoo.com>

The test 'checkout with no pathspec and a case insensitive fs' in t0050 does not really belong there as it tests branch checkout behavior, not filesystem properties. It also had an unnecessary CASE_INSENSITIVE_FS prereq since the sequence of commands should succeed on any filesystem, and it did not verify the resulting worktree contents.

Move it to t2018-checkout-branch.sh where it belongs, drop the prereq, and add a check that the expected file is present after the checkout.

Signed-off-by: mdferdousalam <mdferdousalam1989@yahoo.com>
---
    t2018: move checkout case-insensitive test from t0050
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2054%2Fmdferdousalam%2Fmove-checkout-test-from-t0050-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2054/mdferdousalam/move-checkout-test-from-t0050-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2054
 t/t0050-filesystem.sh      | 20 --------------------
 t/t2018-checkout-branch.sh | 21 +++++++++++++++++++++
 2 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index ca8568067d..003329c082 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -117,24 +117,4 @@ $test_unicode 'merge (silent unicode normalization)' '
 	git merge topic
 '
 
-test_expect_success CASE_INSENSITIVE_FS 'checkout with no pathspec and a case insensitive fs' '
-	git init repo &&
-	(
-		cd repo &&
-
-		>Gitweb &&
-		git add Gitweb &&
-		git commit -m "add Gitweb" &&
-
-		git checkout --orphan todo &&
-		git reset --hard &&
-		mkdir -p gitweb/subdir &&
-		>gitweb/subdir/file &&
-		git add gitweb &&
-		git commit -m "add gitweb/subdir/file" &&
-
-		git checkout main
-	)
-'
-
 test_done
diff --git a/t/t2018-checkout-branch.sh b/t/t2018-checkout-branch.sh
index a48ebdbf4d..5f37e40591 100755
--- a/t/t2018-checkout-branch.sh
+++ b/t/t2018-checkout-branch.sh
@@ -285,4 +285,25 @@ test_expect_success 'checkout -b rejects an extra path argument' '
 	test_grep "Cannot update paths and switch to branch" err
 '
 
+test_expect_success 'checkout a branch when file and directory share case-insensitive name' '
+	git init repo-case &&
+	(
+		cd repo-case &&
+
+		>Gitweb &&
+		git add Gitweb &&
+		git commit -m "add Gitweb" &&
+
+		git checkout --orphan other &&
+		git reset --hard &&
+		mkdir -p gitweb/subdir &&
+		>gitweb/subdir/file &&
+		git add gitweb &&
+		git commit -m "add gitweb/subdir/file" &&
+
+		git checkout master &&
+		test_path_is_file Gitweb
+	)
+'
+
 test_done

base-commit: 7c02d39fc2ed2702223c7674f73150d9a7e61ba4
-- 
gitgitgadget
Next: Junio C Hamano
Message 1 of 3 in “t2018: move checkout case-insensitive test from t0050”
  1. t2018: move checkout case-insensitive test from t0050Md Ferdous Alam via GitGitGadget, Feb 23, 2026
  2. Junio C HamanoFeb 23, 2026
  3. Elijah NewrenFeb 23, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.