git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug in git status
@ 2012-12-26  5:57 Michael Haggerty
  2012-12-26 10:16 ` [PATCH] wt-status: Show ignored files in untracked dirs Antoine Pelisse
  0 siblings, 1 reply; 16+ messages in thread
From: Michael Haggerty @ 2012-12-26  5:57 UTC (permalink / raw)
  To: git discussion list

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/

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-12-30 21:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-26  5:57 Bug in git status Michael Haggerty
2012-12-26 10:16 ` [PATCH] wt-status: Show ignored files in untracked dirs Antoine Pelisse
2012-12-26 13:31   ` [PATCH v2] " Antoine Pelisse
2012-12-27  2:37     ` Junio C Hamano
2012-12-27  3:48       ` Jeff King
2012-12-27  5:08         ` Junio C Hamano
2012-12-27 16:14           ` Antoine Pelisse
2012-12-27 16:19             ` Jeff King
2012-12-27 17:35               ` Antoine Pelisse
2012-12-28 14:05                 ` Antoine Pelisse
2012-12-29  7:22                   ` Jeff King
2012-12-30 14:39                     ` [PATCH 1/2] dir.c: Make git-status --ignored more consistent Antoine Pelisse
2012-12-30 14:54                       ` Antoine Pelisse
2012-12-30 15:01                         ` Adam Spiers
2012-12-30 21:36                         ` Junio C Hamano
2012-12-30 14:39                     ` [PATCH 2/2] git-status: Test --ignored behavior Antoine Pelisse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).