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

Re: Bug: git ls-files and ignored directories

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jun 2, 2012, 10:33 UTC
Message-ID
<CACsJy8CqMudg=uKuDmRHoYAXhUoYhOp3V2ZLuKM8W5wWWE460w@mail.gmail.com>
In-Reply-To
<7vr4tz3tpw.fsf@alter.siamese.dyndns.org>
On Fri, Jun 1, 2012 at 11:03 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> Jeff King <peff@peff.net> writes:
>
>> No, I don't think anybody is working on it at the moment (at least I
>> do not see anything near the time of that old discussion, nor do I
>> recall it being discussed since).
>>
>> +cc Clemens, in case he had any work-in-progress as a result that did
>> not end up getting published.
>
> I think the way the codepath for -i feeds path to excluded() is wrong.
>
> The excluded() interface relies on the fact that the caller has
> already checked foo/ before calling it for foo/bar; when asked to
> see if "foo/bar" is excluded, it does not consider if "foo/" is
> excluded---the caller should have already checked it.

Sparse checkout deals with the exact same problem and it reconstructs a tree structure from cache list, before feeding to excluded(). I thought of generalizing it (e.g. for this case), but with v5 in progress, we'll probably have tree-based index soon. "ls-files -i" could be fixed by then.

-- 
Duy
Previous: Junio C HamanoNext: Christoph Buchner
Message 8 of 13 in “Bug: git ls-files and ignored directories”
  1. Christoph BuchnerMay 30, 2012
  2. Christoph BuchnerMay 31, 2012
  3. Jeff KingJun 1, 2012
  4. Clemens BuchacherJun 1, 2012
  5. Junio C HamanoJun 1, 2012
  6. Junio C HamanoJun 1, 2012
  7. Junio C HamanoJun 1, 2012
  8. Nguyen Thai Ngoc DuyJun 2, 2012
  9. Christoph BuchnerJun 2, 2012
  10. Junio C HamanoJun 2, 2012
  11. Christoph BuchnerJun 3, 2012
  12. Junio C HamanoJun 3, 2012
  13. Junio C HamanoJun 4, 2012

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.