# Status shows untracked directory without any untracked file in it

5 messages from 2012-04-06 to 2012-04-06. Participants: Alexander Kostikov, Jeff King, Johannes Sixt.
Thread: https://gitlist.dev/t/30160

## Alexander Kostikov, 2012-04-06 05:19

Subject: Status shows untracked directory without any untracked file in it
Message-ID: <CAGAhT3n3hHV+UhT+D1o60OAS23WFmx+Lxg=aqYMGC=U-LR1QUA@mail.gmail.com>
URL: https://gitlist.dev/e/CAGAhT3n3hHV%2BUhT%2BD1o60OAS23WFmx%2BLxg%3DaqYMGC%3DU-LR1QUA%40mail.gmail.com

```
How that is possible? Is it a bug?

alexko@ALEXKO-LAB b:\
» git status --untracked-files=normal
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       data/fex/lba/hi/qna/
nothing added to commit but untracked files present (use "git add" to track)

alexko@ALEXKO-LAB b:\
» git status --untracked-files=all
# On branch master
nothing to commit (working directory clean)

--
Alexander Kostikov

```

## Jeff King, 2012-04-06 06:14

Subject: Re: Status shows untracked directory without any untracked file in it
Message-ID: <20120406061447.GC25301@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20120406061447.GC25301%40sigill.intra.peff.net
In-Reply-To: <CAGAhT3n3hHV+UhT+D1o60OAS23WFmx+Lxg=aqYMGC=U-LR1QUA@mail.gmail.com>

```
On Thu, Apr 05, 2012 at 10:19:00PM -0700, Alexander Kostikov wrote:

> How that is possible? Is it a bug?

Maybe. What git version and what platform are you on? There was a bug in
versions of git earlier than v1.7.8 that showed the symptom you describe
on case-insensitive filesystems. It was fixed by commit 2548183, which
contains more details.

-Peff

```

## Johannes Sixt, 2012-04-06 18:58

Subject: Re: Status shows untracked directory without any untracked file in it
Message-ID: <4F7F3CBB.8030805@kdbg.org>
URL: https://gitlist.dev/e/4F7F3CBB.8030805%40kdbg.org
In-Reply-To: <CAGAhT3n3hHV+UhT+D1o60OAS23WFmx+Lxg=aqYMGC=U-LR1QUA@mail.gmail.com>

```
Am 06.04.2012 07:19, schrieb Alexander Kostikov:
> How that is possible? Is it a bug?

I don't think so. git status normally does not look inside directories 
that do not contain any tracked files.

> alexko@ALEXKO-LAB b:\
> » git status --untracked-files=normal
> # On branch master
> # Untracked files:
> #   (use "git add<file>..." to include in what will be committed)
> #
> #       data/fex/lba/hi/qna/
> nothing added to commit but untracked files present (use "git add" to track)

Here, git status only knows that it does not track anything inside 
.../qna/, and it tells you that it found this directory.

> alexko@ALEXKO-LAB b:\
> » git status --untracked-files=all
> # On branch master
> nothing to commit (working directory clean)

Here, you ask to list files in all directories, but, alas, the directory 
does not contain anything untracked. The directory itself is not listed, 
because git would be unable to track an empty directory.

-- Hannes

```

## Jeff King, 2012-04-06 21:59

Subject: Re: Status shows untracked directory without any untracked file in it
Message-ID: <20120406215956.GA31207@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20120406215956.GA31207%40sigill.intra.peff.net
In-Reply-To: <4F7F3CBB.8030805@kdbg.org>

```
On Fri, Apr 06, 2012 at 08:58:03PM +0200, Johannes Sixt wrote:

> Am 06.04.2012 07:19, schrieb Alexander Kostikov:
> >How that is possible? Is it a bug?
> 
> I don't think so. git status normally does not look inside
> directories that do not contain any tracked files.

I think it does:

  $ git init tmp && cd tmp
  $ echo content >tracked
  $ git add tracked
  $ mkdir untracked

  $ git status --untracked-files=normal
  # On branch master
  #
  # Initial commit
  #
  # Changes to be committed:
  #       new file:   tracked
  #

  $ >untracked/file
  $ git status --untracked-files=normal
  # On branch master
  #
  # Initial commit
  #
  # Changes to be committed:
  #       new file:   tracked
  #
  # Untracked files:
  #       untracked/

-Peff

```

## Jeff King, 2012-04-06 22:04

Subject: Re: Status shows untracked directory without any untracked file in it
Message-ID: <20120406220401.GA31346@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20120406220401.GA31346%40sigill.intra.peff.net
In-Reply-To: <CAGAhT3nmOtZLusT8DXy9iWQsNkH2Pqc3YCf-22FZJ-fhHf38cw@mail.gmail.com>

```
[Please keep replies on the list, so others can benefit from the
 discussion. And please don't top-post.]

On Fri, Apr 06, 2012 at 09:30:20AM -0700, Alexander Kostikov wrote:

> Windows. 1.7.9.msysgit.0
> 
> On Thu, Apr 5, 2012 at 11:14 PM, Jeff King <peff@peff.net> wrote:
> >
> > Maybe. What git version and what platform are you on? There was a bug in
> > versions of git earlier than v1.7.8 that showed the symptom you describe
> > on case-insensitive filesystems. It was fixed by commit 2548183, which
> > contains more details.

Your version should have the fix, so it may be a new issue. Is it easily
reproducible? Can you share a short reproduction recipe, or possibly
share the repo showing the problem?

-Peff

```
