Repository: vscode
Issue: Git - Can't stage changing in parent repository
Labels: bug,git

Type: <b>Bug</b>

Steps:
1. setup root repository
2. setup in and child directory subdirectory which files also accessible to parent repository
3. change any file in child repository (it has to be appear in both repositories iin SCM tab)
4. click on "+" for this file in parent repository

Expected: staged changed file in parent repository
Actual: nothing. This file can be staged only in child repository

This bug appear in one of latest builds of VSCode. In 1.86 or near previous all was fine.


VS Code version: Code 1.87.2 (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:20:17.278Z)
OS version: Windows_NT x64 10.0.22631
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|AMD Ryzen 7 5700U with Radeon Graphics          (16 x 1797)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<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_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|undefined|
|Memory (System)|15.33GB (5.84GB free)|
|Process Argv|--crash-reporter-id c8a8cdd8-c9fc-417d-9ca8-30afa1cc43d6|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (37)</summary>

Extension|Author (truncated)|Version
---|---|---
vscode-nginx-conf|ahm|0.3.2
Bookmarks|ale|13.4.2
atlascode|atl|3.0.10
vscode-intelephense-client|bme|1.10.2
vscode-eslint|dba|2.4.4
daily-tasks|dev|0.2.0
xml|Dot|2.5.1
gitlens|eam|14.9.0
EditorConfig|Edi|0.16.4
gc-excelviewer|Gra|4.2.59
Kotlin|mat|1.7.1
git-graph|mhu|1.30.0
websocket-client|moh|0.2.0
vscode-dotnet-runtime|ms-|2.0.2
vscode-edge-devtools|ms-|2.1.5
debugpy|ms-|2024.2.0
flake8|ms-|2023.10.0
isort|ms-|2023.10.1
python|ms-|2024.2.1
vscode-pylance|ms-|2024.3.1
datawrangler|ms-|0.28.0
jupyter|ms-|2024.2.0
jupyter-renderers|ms-|1.0.17
vscode-jupyter-cell-tags|ms-|0.1.8
vscode-jupyter-slideshow|ms-|0.1.5
remote-wsl|ms-|0.86.0
anycode|ms-|0.0.73
anycode-c-sharp|ms-|0.0.5
anycode-go|ms-|0.0.5
anycode-python|ms-|0.0.5
vscode-typescript-next|ms-|5.5.20240314
vscode-thunder-client|ran|2.19.5
vscode-commons|red|0.0.6
vscode-yaml|red|1.14.0
volar|Vue|2.0.6
php-debug|xde|1.34.0
cursorCharCode|zei|0.2.4


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:30986170
pythontbext0:30879054
accentitlementsc:30887149
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
pydisww1:30981707
cppperfnew:30979542
d34g3935:30971562
fegfb526:30981948
bg6jg535:30979843
dsvsc020:30976470

```

</details>

<!-- generated by issue reporter -->