[BUG?] ls-files -o now traverses nested repo when given multiple pathspecs
- From
Kyle Meyer <kyle@kyleam.com>
- Date
- Dec 3, 2019, 22:08 UTC
- Message-ID
- <87fti15agv.fsf@kyleam.com>
89a1f4aaf7 (dir: if our pathspec might match files under a dir, recurse into it, 2019-09-17) introduced a change in behavior in terms of traversing untracked nested repositories. Say we have a repository that contains a single untracked repository with untracked content:
$ git init && git init a && touch a/x
Calling ls-files with the nested repository as the sole pathspec does not recurse into that repository:
$ git ls-files --other a
a/However, as of 89a1f4aaf7, adding an additional pathspec results in the nested repository being traversed:
$ git ls-files --other a foo
a/
a/xReading 89a1f4aaf7 and skimming the patch series and related thread [*], I haven't found anything that makes me think this change in behavior was intentional.
[*]: https://lore.kernel.org/git/20190905154735.29784-1-newren@gmail.com/