# Bug in git-status with non-ascii characters:

6 messages from 2007-01-09 to 2007-01-09. Participants: Brian Gernhardt, Shawn O. Pearce, Juergen Ruehle, Wolfgang Fischer, Johannes Schindelin.
Thread: https://gitlist.dev/t/6295

## Brian Gernhardt, 2007-01-09 05:09

Subject: Bug in git-status with non-ascii characters:
Message-ID: <7BACA5DE-9DBA-4299-A965-E248263E27E2@silverinsanity.com>
URL: https://gitlist.dev/e/7BACA5DE-9DBA-4299-A965-E248263E27E2%40silverinsanity.com

```
`git status` always reports the following:

----- 8< -----
# On branch refs/heads/master
# Untracked files:
#   (use "git add <file>..." to incrementally add content to commit)
#
#       gitweb/test/Märchen
no changes added to commit (use "git add" and/or "git commit [-a|-i|- 
o]")
----- 8< -----

When I do `rm gitweb/test/M<tab>` to remove this apparently unneeded  
file, `git status` reports:

----- 8< -----
# On branch refs/heads/master
# Changed but not added:
#   (use "git add <file>..." to incrementally add content to commit)
#
#       deleted:    gitweb/test/Märchen
#
no changes added to commit (use "git add" and/or "git commit [-a|-i|- 
o]")
----- 8< -----

This is on Mac OS X, file system is HFS+ (Journaled).  Is this  
expected?  I can't figure out why it's happening.

~~ Brian
```

## Shawn O. Pearce, 2007-01-09 05:28

Subject: Re: Bug in git-status with non-ascii characters:
Message-ID: <20070109052832.GA2371@spearce.org>
URL: https://gitlist.dev/e/20070109052832.GA2371%40spearce.org
In-Reply-To: <7BACA5DE-9DBA-4299-A965-E248263E27E2@silverinsanity.com>

```
Brian Gernhardt <benji@silverinsanity.com> wrote:
> This is on Mac OS X, file system is HFS+ (Journaled).  Is this  
> expected?  I can't figure out why it's happening.

There's a bug in the Mac OS X filesystem apparently.

Git created the file with one encoding.  Later when Git does a
readdir() to find out what files are in the directory Mac OS X is
returning it with a different encoding.  There's more details in
the list archives; all I know is Mac OS X is broken here.  And we
Mac users get to suffer...

P.S. I'm also a Mac OS X user.  I've gotten used to that file
showing up and just visually ignore it now.  *sigh*

-- 
Shawn.

```

## Brian Gernhardt, 2007-01-09 05:35

Subject: Re: Bug in git-status with non-ascii characters:
Message-ID: <0F18E523-350A-48F5-AD7C-A1B3C21A3B56@silverinsanity.com>
URL: https://gitlist.dev/e/0F18E523-350A-48F5-AD7C-A1B3C21A3B56%40silverinsanity.com
In-Reply-To: <20070109052832.GA2371@spearce.org>

```

On Jan 9, 2007, at 12:28 AM, Shawn O. Pearce wrote:

> There's a bug in the Mac OS X filesystem apparently.
>
> Git created the file with one encoding.  Later when Git does a
> readdir() to find out what files are in the directory Mac OS X is
> returning it with a different encoding.  There's more details in
> the list archives; all I know is Mac OS X is broken here.  And we
> Mac users get to suffer...

D'oh.  RTFL?  I should have known better minds than I had looked at  
this already.

> P.S. I'm also a Mac OS X user.  I've gotten used to that file
> showing up and just visually ignore it now.  *sigh*

I'm pretty used to it showing up, I was just poking around git (see  
recent patches) and thought about tracking it down.

~~ Brian

```

## Juergen Ruehle, 2007-01-09 05:39

Subject: Re: Bug in git-status with non-ascii characters:
Message-ID: <17827.10918.897000.825178@lapjr.intranet.kiel.bmiag.de>
URL: https://gitlist.dev/e/17827.10918.897000.825178%40lapjr.intranet.kiel.bmiag.de
In-Reply-To: <7BACA5DE-9DBA-4299-A965-E248263E27E2@silverinsanity.com>

```
Brian Gernhardt writes:
 > `git status` always reports the following:
 > 
 > ----- 8< -----
 > # On branch refs/heads/master
 > # Untracked files:
 > #   (use "git add <file>..." to incrementally add content to commit)
 > #
 > #       gitweb/test/Märchen
 > no changes added to commit (use "git add" and/or "git commit [-a|-i|- 
 > o]")
 > ----- 8< -----
 > 
 > When I do `rm gitweb/test/M<tab>` to remove this apparently unneeded  
 > file, `git status` reports:
 > 
 > ----- 8< -----
 > # On branch refs/heads/master
 > # Changed but not added:
 > #   (use "git add <file>..." to incrementally add content to commit)
 > #
 > #       deleted:    gitweb/test/Märchen
 > #
 > no changes added to commit (use "git add" and/or "git commit [-a|-i|- 
 > o]")
 > ----- 8< -----
 > 
 > This is on Mac OS X, file system is HFS+ (Journaled).  Is this  
 > expected?  I can't figure out why it's happening.

It's a known problem with HFS+: it uses different byte sequences to
identify the same file. Therefore git finds gitweb/test/Märchen
unchanged but also a gitweb/test/Märchen in the working directory
using a different byte sequence for the name as reported in status. If
you delete the file git doesn't find the file any longer and reports
that in status as well.

```

## Wolfgang Fischer, 2007-01-09 14:14

Subject: Re: Bug in git-status with non-ascii characters:
Message-ID: <6EBAA8D1-9839-4B77-968A-2828B19A9BF7@wf227.com>
URL: https://gitlist.dev/e/6EBAA8D1-9839-4B77-968A-2828B19A9BF7%40wf227.com
In-Reply-To: <17827.10918.897000.825178@lapjr.intranet.kiel.bmiag.de>

```

On 09.01.2007, at 06:39, Juergen Ruehle wrote:

> Brian Gernhardt writes:
>> `git status` always reports the following:
>>
>> ----- 8< -----
>> # On branch refs/heads/master
>> # Untracked files:
>> #   (use "git add <file>..." to incrementally add content to commit)
>> #
>> #       gitweb/test/Märchen
>> no changes added to commit (use "git add" and/or "git commit [-a|-i|-
>> o]")
>> ----- 8< -----
>>
>> When I do `rm gitweb/test/M<tab>` to remove this apparently unneeded
>> file, `git status` reports:
>>
>> ----- 8< -----
>> # On branch refs/heads/master
>> # Changed but not added:
>> #   (use "git add <file>..." to incrementally add content to commit)
>> #
>> #       deleted:    gitweb/test/Märchen
>> #
>> no changes added to commit (use "git add" and/or "git commit [-a|-i|-
>> o]")
>> ----- 8< -----
>>
>> This is on Mac OS X, file system is HFS+ (Journaled).  Is this
>> expected?  I can't figure out why it's happening.
>
> It's a known problem with HFS+: it uses different byte sequences to
> identify the same file. Therefore git finds gitweb/test/Märchen
> unchanged but also a gitweb/test/Märchen in the working directory
> using a different byte sequence for the name as reported in status. If
> you delete the file git doesn't find the file any longer and reports
> that in status as well.

Since this problem is discussed every other week, how about changing  
the name of the test file to scheußlicher_Dateiname or so, since the  
sz-ligature does not have the problem of different UTF-8  
normalization forms. It wont fix HFS+, but since HFS+ is designed to  
accept either UTF-8 normalization form and returning just NFD, nobody  
will change/fix HFS+ anyway.

	Wolfgang
```

## Johannes Schindelin, 2007-01-09 14:48

Subject: Re: Bug in git-status with non-ascii characters:
Message-ID: <Pine.LNX.4.63.0701091547340.22628@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0701091547340.22628%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <6EBAA8D1-9839-4B77-968A-2828B19A9BF7@wf227.com>

```
Hi,

On Tue, 9 Jan 2007, Wolfgang Fischer wrote:

> Since this problem is discussed every other week, how about changing the 
> name of the test file to scheußlicher_Dateiname or so, since the 
> sz-ligature does not have the problem of different UTF-8 normalization 
> forms.

Good idea! But I'd name it "Oane-Maß" instead ;-)

Ciao,
Dscho


```
