public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste•net>
To: Milan AJDINOVIC <milan.ajdinovic@se•com>
Cc: "git@vger•kernel.org" <git@vger•kernel.org>
Subject: Re: Git client bug with branch containing "."
Date: Tue, 1 Apr 2025 21:16:32 +0000	[thread overview]
Message-ID: <Z-xXsCs3Wr6NwYx1@tapette.crustytoothpaste.net> (raw)
In-Reply-To: <VI1PR04MB695864E125F3381932332BDC91AC2@VI1PR04MB6958.eurprd04.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1776 bytes --]

On 2025-04-01 at 12:19:47, Milan AJDINOVIC wrote:
> What did you do before the bug happened? (Steps to reproduce your issue)
> On GitHub Enterprise server I have created a branch named: features/team1/feature./1.0/main in my repo.
> I tried to fetch the branch and switch to it.
> 
> What did you expect to happen? (Expected behavior)
> I expected for branch to be switched to:features/team1/feature./1.0/main
> What happened instead? (Actual behavior)
> I got an error: fatal: cannot lock ref 'refs/heads/features/team1/feature./1.0/main': unable to create directory for .git/refs/heads/features/team1/feature./1.0/main
> What's different between what you expected and what actually happened?
> The branch did no switch.
> Anything else you want to add:
> From my analisys the problem is because my branch have "feature." in it and Windows can not create directory with "." at the end.

I think that's correct as to why it's not working.  Git by default uses
the files ref backend, which stores the data in files in the repository,
and in your case, Windows is unable to create that directory.  That's
unfortunately a limitation of Windows and we can't do anything about it.

We allow those branches because Unix systems don't have this problem and
users working with Unix-only repositories might want to use them.

> git version 2.42.0.windows.2

If you use the latest release (2.49.0), you can probably switch to the
experimental reftable backend using `git refs migrate
--ref-format=reftable`, which will not have this problem.  However,
please make a backup of your repository first, since we've seen some
bugs during the conversion that have caused problems, including with
stashes.
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

      parent reply	other threads:[~2025-04-01 21:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01 12:19 Git client bug with branch containing "." Milan AJDINOVIC
2025-04-01 15:55 ` Johannes Schindelin
2025-04-01 21:16 ` brian m. carlson [this message]

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=Z-xXsCs3Wr6NwYx1@tapette.crustytoothpaste.net \
    --to=sandals@crustytoothpaste$(echo .)net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=milan.ajdinovic@se$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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