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

Re: git ls-files -o seems to ignore .gitignore

From
Rrichard.palo@free.fr <richard.palo@free.fr>
Date
Oct 27, 2014, 09:22 UTC
Message-ID
<391421950.105620016.1414401723677.JavaMail.root@zimbra7-e1.priv.proxad.net>
In-Reply-To
<vpq8uk1lxqb.fsf@anie.imag.fr>

Well, ok. Not very intuitive, so I added an alias in .gitconfig... 'ls = ls-files --exclude-standard' and that seems to work now alright for me.

Thanks
----- Mail original -----
Show 28 quoted lines
> De: "Matthieu Moy" <Matthieu.Moy@grenoble-inp.fr>
> À: "Charles Bailey" <charles@hashpling.org>
> Cc: "Richard PALO" <richard@netbsd.org>, git@vger.kernel.org
> Envoyé: Lundi 27 Octobre 2014 09:31:56
> Objet: Re: git ls-files -o seems to ignore .gitignore
> 
> Charles Bailey <charles@hashpling.org> writes:
> 
> > On Mon, Oct 27, 2014 at 07:16:49AM +0100, Richard PALO wrote:
> >> Hash: SHA1
> >> 
> >> I'm having an issue in that 'git ls-files -o' seems to ignore
> >> [parts of] .gitignore whereas other commands, such as 'git status'
> >> seem fine.
> >
> > This is, as far as I am aware, by design.
> 
> I would not call that "by design", but indeed "git ls" was written
> this
> way, and it's a plumbing command for which we do not want
> backward-incompatible changes. So, --exclude-standard is available,
> but
> not activated by default.
> 
> --
> Matthieu Moy
> http://www-verimag.imag.fr/~moy/
> 
Previous: Matthieu Moy
Message 4 of 4 in “git ls-files -o seems to ignore .gitignore”
  1. Richard PALOOct 27, 2014
  2. Charles BaileyOct 27, 2014
  3. Matthieu MoyOct 27, 2014
  4. richard.palo@free.frOct 27, 2014

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.