# Tracked files become untracked in some obscure scenario

2 messages from 2011-08-09 to 2011-08-10. Participants: Stéphane Corlosquet, Jeff King.
Thread: https://gitlist.dev/t/28057

## Stéphane Corlosquet, 2011-08-09 19:59

Subject: Tracked files become untracked in some obscure scenario
Message-ID: <CAGR+nnFM+Pr29h4POarx5rQdrTuMvtwwZLwVPZuChSDKQjLg4g@mail.gmail.com>
URL: https://gitlist.dev/e/CAGR%2BnnFM%2BPr29h4POarx5rQdrTuMvtwwZLwVPZuChSDKQjLg4g%40mail.gmail.com

```
Hi,

I'm encountering a very strange bug where some directory containing
one file becomes untracked when it should be tracked. I originally
found this bug in a bigger repository, but I isolated the culprit
files into a small tarball which you can download from
http://files.openspring.net/tmp/gitbug-20110809.tgz

This bug occurs on the following three configs:
Mac OS X Snow Leopard with git 1.7.4.1
Mac OS X Snow Leopard with git 1.7.5
Mac OS X Lion with git 1.7.4.4
I could not reproduce on Ubuntu.

To reproduce, extract the tarball and try to add its content into a fresh repo:
$ git init
Initialized empty Git repository in /private/tmp/stemtest/.git/
$ git add .
$ git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
#   (use "git rm --cached <file>..." to unstage)
#
# new file:   drupal/sites/all/modules/scf/pubnode_docbook4/xsl/docbook-xsl-1.73.2/common/olink.xsl
# new file:   files/pubnode/ab4d8c648ef8e26312beaba802a503d1f8081bb6/README
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
# files/pubnode/ab4d8c648ef8e26312beaba802a503d1f8081bb6/

From there onwards, if I commit and do other operations, this
directory will remain in the untracked files list. I'm terribly
confused by this bug. It seems it has to do with the paths of both
files, since if I rename them, the bug does not happen. But I can't
explain what's going on.

regards,
Steph.

```

## Jeff King, 2011-08-10 02:51

Subject: Re: Tracked files become untracked in some obscure scenario
Message-ID: <20110810025125.GA8554@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20110810025125.GA8554%40sigill.intra.peff.net
In-Reply-To: <CAGR+nnFM+Pr29h4POarx5rQdrTuMvtwwZLwVPZuChSDKQjLg4g@mail.gmail.com>

```
On Tue, Aug 09, 2011 at 03:59:08PM -0400, Stéphane Corlosquet wrote:

> I'm encountering a very strange bug where some directory containing
> one file becomes untracked when it should be tracked. I originally
> found this bug in a bigger repository, but I isolated the culprit
> files into a small tarball which you can download from
> http://files.openspring.net/tmp/gitbug-20110809.tgz
> 
> This bug occurs on the following three configs:
> Mac OS X Snow Leopard with git 1.7.4.1
> Mac OS X Snow Leopard with git 1.7.5
> Mac OS X Lion with git 1.7.4.4
> I could not reproduce on Ubuntu.

I suspect this may be another case of this bug:

  http://thread.gmane.org/gmane.comp.version-control.git/173612/focus=174634

Does the patch posted in that thread[1] make the problem go away?

-Peff

[1] The actual patch is in:

    http://article.gmane.org/gmane.comp.version-control.git/174636

```
