Subject: [BUG?] ls-files -o now traverses nested repo when given multiple pathspecs

From: Kyle Meyer <[email-masked]>
Date: Tue, 03 Dec 2019 17:08:00 -0500

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/x

Reading 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/[email-masked]/