I have some files in .gitignore that I want to search in anyway. (In this case they're git repositories inside a main git repository that are managed by a script rather than as submodules.) --no-ignore-vcs excludes the entire gitignore, which I don't want because that includes things like build directories. I just want to whitelist some directories, which I was thinking I could do with a .ignore pattern like !/third_party.
That's exactly how it works:
> git init
> mkdir third_party
> touch third_party/needle
> fd needle
third_party/needle
> echo '/third_party' > .gitignore
> fd needle
> echo '!/third_party' > .ignore # .fdignore works as well
> fd needle
third_party/needle
It turns out I was holding it wrong: gitignore had /third_party/* so I needed to put !/third_party/* in .ignore rather than !/third_party.