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/ What's different between what you expected and what actually happened? The folders did not match the grep pattern but were still listed. Anything else you want to add: Please review the rest of the bug report below. You can delete any lines you don't wish to share. [System Info] git version: git version 2.28.0 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Darwin 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 18 21:21:34 PDT 2020; root:xnu-4570.71.82.5~1/RELEASE_X86_64 x86_64 compiler info: clang: 10.0.0 (clang-1000.11.45.5) libc info: no libc information available $SHELL (typically, interactive shell): /bin/bash [Enabled Hooks] pre-commit commit-msg post-commit post-checkout post-merge pre-push post-rewrite