Thread (7 messages) 7 messages, 3 authors, 2020-08-12

Re: ls-files bug report

From: christian w <hidden>
Date: 2020-08-06 00:27:57

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/

On Wed, Aug 5, 2020 at 7:59 PM Kyle Meyer [off-list ref] wrote:
christian w writes:
quoted
Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)

git ls-files --others 'some/path/*.some.extension'

What did you expect to happen? (Expected behavior)

only list files under some/path/ that had .some.extension

What happened instead? (Actual behavior)

It listed those files and also all untracked folders underneath some/path/
I tried to follow your description, and I don't see this on my end.  In
a fresh repository:

    $ mkdir -p some/path/d0
    $ mkdir -p some/path/d1
    $ touch some/path/f0 some/path/d0/f0 some/path/f1.some.extension

    $ git ls-files --others
    some/path/d0/f0
    some/path/f0
    some/path/f1.some.extension

    $ git ls-files --others 'some/path/*.some.extension'
    some/path/f1.some.extension

    $ git version
    git version 2.28.0

Could you provide a more detailed recipe to reproduce the issue?
quoted
[System Info]
git version:
git version 2.28.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help