git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Chris Torek <chris.torek@gmail.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
	 Karthik Nayak <karthik.188@gmail.com>,
	 K Jayatheerth <jayatheerthkulkarni2005@gmail.com>,
	 ryenus@gmail.com, git@vger.kernel.org
Subject: Re: Re [bug] pull --prune could not delete references due to lock file already exists error
Date: Wed, 02 Jul 2025 08:37:58 -0700	[thread overview]
Message-ID: <xmqq5xgafvs9.fsf@gitster.g> (raw)
In-Reply-To: <CAPx1Gveenh075k5W-KAKnyJKfdzMNL0iry-043mLB8rKZ_2wuQ@mail.gmail.com> (Chris Torek's message of "Tue, 1 Jul 2025 21:50:37 -0700")

Chris Torek <chris.torek@gmail.com> writes:

> On Mon, Jun 30, 2025 at 7:21 AM brian m. carlson
> <sandals@crustytoothpaste.net> wrote:
> [regarding]
>> > +                             if (ignore_case && prev && !strcasecmp(ref->next, prev))
>> This won't work in the general case, since the two refs that match case
>> insensitively aren't guaranteed to be adjacent.
>
> Also worth mention: it's not just case-folding that matters.
>
> On OS X (Macs), path names get "normalized" so that the names
>
>    s c h combining-umlaut o n
>
> and
>
>    s c h umlaut-o n
>
> refer to the *same* file or directory. On a typical Linux/Unix FS, they differ.
>
> (I don't know what Windows does!)
>
> So, if you have a "folder-full" of "pretty" German refnames, some
> spelled one way and some another, well...
>
> (It's not clear to me what, if anything, Git should attempt to do here.)

The system supplied argv[] is fed to the precompose_argv_prefix()
helper in compat/precompose_utf8.c; opendir/readdir/closedir are
also wrapped with similar NFD/NFC normalization (really, UTF-8-MAC
vs UTF-8) helpers defined in the same file.  So the path you read
(via the opendir/readdir like dir.c does) from the system, or the
path you are fed from the command line (via argv[]), are normalized
before code in Git above the compat layer even sees them.  The path
recoreded in various mechanisms in Git like the index and the tree
objects are all normalized.


  reply	other threads:[~2025-07-02 15:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-25 12:32 [bug] pull --prune could not delete references due to lock file already exists error ryenus
2025-06-25 14:18 ` Re " K Jayatheerth
2025-06-27 18:59   ` brian m. carlson
2025-06-30  7:26     ` JAYATHEERTH K
2025-06-30 13:46   ` Karthik Nayak
2025-06-30 14:20     ` brian m. carlson
2025-06-30 21:10       ` Junio C Hamano
2025-07-01 10:31         ` Patrick Steinhardt
2025-07-01 16:14           ` Junio C Hamano
2025-07-02  8:50             ` Patrick Steinhardt
2025-07-01  8:20       ` Karthik Nayak
2025-07-02  4:50       ` Chris Torek
2025-07-02 15:37         ` Junio C Hamano [this message]
2025-07-01  0:52     ` JAYATHEERTH K

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=xmqq5xgafvs9.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=chris.torek@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jayatheerthkulkarni2005@gmail.com \
    --cc=karthik.188@gmail.com \
    --cc=ryenus@gmail.com \
    --cc=sandals@crustytoothpaste.net \
    /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;
as well as URLs for NNTP newsgroup(s).