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

Re: ls-files bug report

From
Kyle Meyer <kyle@kyleam.com>
Date
Aug 6, 2020, 01:54 UTC
Message-ID
<8736504k06.fsf@kyleam.com>
In-Reply-To
<CADjceoRtFmM2H1z48HcmvWBF1KmMrwMnE6YdC9HJGFjdXXivJw@mail.gmail.com>
christian w writes:
Show 15 quoted lines
> Sorry for the insufficient reproduction steps.
>
> I managed to figure out it has something to do with git repos within
> git repos. It happened to us because of go packages that are inside
> our repo. These are the reproduction steps that work for me
> consistently using Go version go1.14.4 darwin/amd64. This is the repo
> that gets cloned into src/golang.org/x/debug by the go get command:
> https://github.com/golang/debug/tree/66ec140f2f72d15dc6133502edd2bb7238b1740c
>
> $ mkdir testdir
> $ cd testdir
> $ git init .
> $ GOPATH=$(pwd) go get -u golang.org/x/debug/ || true
> $ git ls-files --others '*.txt'#
> src/golang.org/x/debug/
Okay, removing Go from the equation:
     $ # in fresh repo
     $ mkdir a
     $ git init a/d0
     $ touch a/f0.txt
     $ git ls-files --others 'a/*.txt'
     a/d0/
     a/f0.txt

It looks like the spurious a/d0/ entry doesn't show up until v2.27.0, in particular 95c11ecc73 (Fix error-prone fill_directory() API; make it only return matches, 2020-04-01). Adding the author to the Cc. (Sorry, Elijah, I recall your frustration with dir.c from a previous ls-files issue that I reported [1]).

[1] https://lore.kernel.org/git/CABPp-BFG3FkTkC=L1v97LUksndkOmCN8ZhNJh5eoNdquE7v9DA@mail.gmail.com/
Previous: christian wNext: Elijah Newren
Message 4 of 7 in “ls-files bug report”
  1. christian wAug 5, 2020
  2. Kyle MeyerAug 5, 2020
  3. christian wAug 6, 2020
  4. Kyle MeyerAug 6, 2020
  5. Elijah NewrenAug 7, 2020
  6. Elijah NewrenAug 12, 2020
  7. christian wAug 12, 2020

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.