Subject: Bug in git status

From: Michael Haggerty <[email-masked]>
Date: Wed, 26 Dec 2012 06:57:03 +0100

I think I have found a bug in "git status --untracked-files=all
--ignored", in both 1.8.0 and in master:

$ git init status-test
Initialized empty Git repository in
/home/mhagger/self/proj/git/status-test/.git/
$ cd status-test
$ touch x
$ touch x.ignore-me
$ mkdir y
$ touch y/foo
$ touch y/foo.ignore-me
$ git status --porcelain --untracked-files=all --ignored
?? x
?? x.ignore-me
?? y/foo
?? y/foo.ignore-me

The above output is what I expect.  But if I add a .gitignore file, the
output of y/foo.ignore-me is incorrectly suppressed:

$ echo '*.ignore-me' >.gitignore
$ git status --porcelain --untracked-files=all --ignored
?? .gitignore
?? x
?? y/foo
!! x.ignore-me

I came across this problem when trying to use the results of the above
command to build a more flexible "git clean" type of script.

I don't have time to look into this at the moment, if somebody wants to
jump in.

Michael

-- 
Michael Haggerty
[email-masked]
http://softwareswirl.blogspot.com/