Bug in git status
- From
Michael Haggerty <mhagger@alum.mit.edu>
- Date
- Dec 26, 2012, 05:57 UTC
- Message-ID
- <50DA91AF.1060200@alum.mit.edu>
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 mhagger@alum.mit.edu http://softwareswirl.blogspot.com/