From: Junio C Hamano <gitster@pobox.com>
To: Richard Carlsson <carlsson.richard@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git may delete current branch on case insensitive file system (Mac)
Date: Fri, 15 Aug 2025 08:41:40 -0700 [thread overview]
Message-ID: <xmqqfrdstwwb.fsf@gitster.g> (raw)
In-Reply-To: <CANKG3zmtFmFfUDtARuOyAgv8Le+Rotwmdv-sWWnQ2Ca+7d0DRw@mail.gmail.com> (Richard Carlsson's message of "Fri, 15 Aug 2025 11:50:17 +0200")
Richard Carlsson <carlsson.richard@gmail.com> writes:
> This was a fun one. I accidentally upcased the first letter of a
> branch beginning with "d" instead of
> upcasing the -d option as I had intended, with a surprising result
> (Mac OS). Easily reproduced:
>
> % git checkout -b dummy
> Switched to a new branch 'dummy'
> % git branch -d dummy
> error: cannot delete branch 'dummy' used by worktree at '/Users/riccar/...'
> % git branch -D dummy
> error: cannot delete branch 'dummy' used by worktree at '/Users/riccar/...'
> % git branch -d Dummy
> Deleted branch Dummy (was c32dfb2).
> % git log
> fatal: your current branch 'dummy' does not have any commits yet
>
> On Linux, you instead get
>
> % git branch -d Dummy
> error: branch 'Dummy' not found
Perhaps you want to opt into the reftable backend before everybody
else does? Because it does not store each reference (branches, tags
and their friends) as a file on the filesystem, it would sidestep
the above issue case-challenged filesystems has.
next prev parent reply other threads:[~2025-08-15 15:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-15 9:50 git may delete current branch on case insensitive file system (Mac) Richard Carlsson
2025-08-15 15:41 ` Junio C Hamano [this message]
2025-08-19 8:15 ` Patrick Steinhardt
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=xmqqfrdstwwb.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=carlsson.richard@gmail.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.