From: Junio C Hamano <gitster@pobox.com>
To: "Md Ferdous Alam via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,
Md Ferdous Alam <mdferdousalam1989@yahoo.com>,
Elijah Newren <newren@gmail.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] t2018: move checkout case-insensitive test from t0050
Date: Mon, 23 Feb 2026 08:12:13 -0800 [thread overview]
Message-ID: <xmqqjyw3o2w2.fsf@gitster.g> (raw)
In-Reply-To: <pull.2054.git.1771837399472.gitgitgadget@gmail.com> (Md Ferdous Alam via GitGitGadget's message of "Mon, 23 Feb 2026 09:03:19 +0000")
"Md Ferdous Alam via GitGitGadget" <gitgitgadget@gmail.com> writes:
Adding CC the authors of 69f272b9 (dir: special case check for the
possibility that pathspec is NULL, 2019-10-01) and 06d53148 (t[01]*:
adjust the references to the default branch name "main", 2020-11-18)
the block of lines removed by this patch are blamed for.
One thing that I noticed that needs checking but I didn't do so
myself is that the original is prepared not to break after Git 3.0
by using 'main' in t0050 (which forces the initial branch name to be
'main'). Whereever the corresponding new code goes, there needs a
similar provision to prevent the test from getting broken with the
default change.
I think specifying the initial branch name explicitly when the test
creates "repo-case" test repository and use that to go back to that
branch would be better for the purpose of this single test, rather
than using the blanket "GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME" for
the entire script.
> 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
next prev parent reply other threads:[~2026-02-23 16:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 9:03 [PATCH] t2018: move checkout case-insensitive test from t0050 Md Ferdous Alam via GitGitGadget
2026-02-23 16:12 ` Junio C Hamano [this message]
2026-02-23 17:04 ` Elijah Newren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqjyw3o2w2.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=mdferdousalam1989@yahoo.com \
--cc=newren@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox