Repository: vscode
Issue: explorer.excludeGitIgnore is not working in a multiroot workspace when .gitignore is outside the workspace
Labels: bug,file-explorer,confirmation-pending

Type: <b>Bug</b>

* Create a root folder
* Add a .gitignore file to the root folder with a simple exclusion
* Add a few subfolders to the root
* Add some content to the subfolders that will be excluded by .gitignore
* Create a new multiroot workspace using the subfolders
* Confirm that gitignored files are greyed out in the explorer
* Toggle the explorer.excludeGitIgnore setting and see that the files are not hidden, regardless of the setting.

VS Code version: Code - Insiders 1.75.0-insider (270c3b12906a88e9c67fc5ddef87be6aa3b75551, 2023-01-25T05:23:17.608Z)
OS version: Windows_NT x64 10.0.22623
Modes:
Sandboxed: Yes

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|11th Gen Intel(R) Core(TM) i7-1195G7 @ 2.90GHz (8 x 2918)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_renderer: enabled_on<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: disabled_off|
|Load (avg)|undefined|
|Memory (System)|15.71GB (3.87GB free)|
|Process Argv|--crash-reporter-id 9d690057-6eaf-4845-aeb9-3ced9535ee09|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (47)</summary>

Extension|Author (truncated)|Version
---|---|---
namespace|adr|1.1.2
vscode-zipfs|arc|3.0.0
path-intellisense|chr|2.8.4
vscode-markdownlint|Dav|0.49.0
vscode-eslint|dba|2.2.6
EditorConfig|Edi|0.16.4
vsc-material-theme|Equ|33.6.0
vsc-material-theme-icons|equ|2.5.0
vscode-jest-runner|fir|0.4.60
dotnet-test-explorer|for|0.7.8
auto-using|Fud|0.7.15
copilot|Git|1.70.8099
rest-client|hum|0.25.1
nuget-reverse-package-search|jes|0.1.68
vscode-pug|joh|1.0.24
roslynator|jos|4.2.0
docomment|k--|0.1.32
gitless|maa|11.7.2
vscode-docker|ms-|1.23.3
csharp|ms-|1.25.4
vscode-edge-devtools|ms-|2.1.1
data-workspace-vscode|ms-|0.4.0
mssql|ms-|1.17.0
sql-bindings-vscode|ms-|0.3.0
sql-database-projects-vscode|ms-|0.21.0
remote-containers|ms-|0.273.0
remote-ssh|ms-|0.94.0
remote-ssh-edit|ms-|0.84.0
remote-wsl|ms-|0.75.1
vscode-remote-extensionpack|ms-|0.23.0
azure-account|ms-|0.11.3
remote-explorer|ms-|0.0.3
test-adapter-converter|ms-|0.1.6
vsliveshare|ms-|1.0.5808
vsliveshare-audio|ms-|0.1.91
vsliveshare-pack|ms-|0.4.0
debugger-for-edge|msj|1.0.15
indent-rainbow|ode|8.3.1
vscode-versionlens|pfl|1.0.14
trailing-spaces|sha|0.4.1
markdown-preview-enhanced|shd|0.6.7
code-spell-checker|str|2.15.0
pdf|tom|1.2.2
vscode-counter|uct|3.2.0
volar|Vue|1.0.24
markdown-all-in-one|yzh|3.5.0
vitest-explorer|Zix|0.2.37

(6 theme extensions excluded)

</details><details>
<summary>A/B Experiments</summary>

```
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
pythonvspyl392:30422396
pythontb:30258533
pythonptprofiler:30281269
vsdfh931cf:30280410
vshan820:30294714
pythondataviewer:30285072
vscod805:30301674
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30404738
cppdebug:30492333
vsclangdf:30492506
c4g48928:30535728
dsvsc012:30540252
pynewext54:30618038
pylantcb52:30590116
pyindex848:30611229
nodejswelcome1:30587009
pyind779:30611226
vscrp:30624060
pythonsymbol12:30651887
a9j8j154:30646983

```

</details>

<!-- generated by issue reporter -->

Screenshot of VSCode, with file explorer overlaid
<img width="893" alt="image" src="https://user-images.githubusercontent.com/234581/214716952-99dfbf96-4bb6-493c-8d72-56a187d4ca49.png">