git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git status --ignored

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 2, 2011, 05:13 UTC
Message-ID
<7vr57cerxo.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4DE712CE.20509@vpac.org>
Andrew Spiers <aspiers@vpac.org> writes:
Show 5 quoted lines
> This looks like a bug in git 1.7.4.1.
>
> git status --ignored does not show my ignored files and
> directories. git status -h suggests it should.
> git status --ignored -h does show my ignored files and directories.

Does not reproduce for me. With --ignored (with or without -s), I see all the dot-o files that are ignored by .gitignore rules that are usually omitted from status output without --ignored.

  $ make >/dev/null 2>&1
  $ rungit v1.7.3 status | grep -F git.o
  $ rungit v1.7.3 status --ignored | grep -F git.o
  #       git.o
  $ rungit v1.7.3 status -s --ignored | grep -F git.o
  !! git.o

The same for v1.7.4.5 or more recent versions. I am not inclined to build and install v1.7.4.1 to test, as I do not think it is likely that the particular version is bad. It is more likely that there is something wrong with your particular setting or expectation. E.g. already tracking a path that would match .gitignore rule, and expecting that such a path is shown, even though it is not "ignored".

> Also, git help status does not mention the --ignored switch.
That may be true; patches welcome.
Previous: Andrew SpiersNext: Jeff King
Message 2 of 7 in “git status --ignored”
  1. Andrew SpiersJun 2, 2011
  2. Junio C HamanoJun 2, 2011
  3. Jeff KingJun 2, 2011
  4. Jeff KingJun 2, 2011
  5. Junio C HamanoJun 2, 2011
  6. Jeff KingJun 2, 2011
  7. Junio C HamanoJun 2, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.