Repository: vscode
Issue: Git - gutter shows changes on symlink file even if git/scm says no changes
Labels: bug,git,confirmed

Type: <b>Bug</b>

```shell
~ $ git --version
git version 2.34.1

~ $ mkdir test
~/test $ cd test
~/test $ git init
Initialized empty Git repository in ~/test/.git/
~/test $ touch file
~/test $ mkdir folder && cd folder
~/test/folder $ ln -s ../file link
~/test/folder $ cd ..
~/test $ git add .
~/test $ git commit -m "commit"
[main (root-commit) cdd16d7] commit
 2 files changed, 2 insertions(+)
 create mode 100644 file
 create mode 120000 folder/link
~/test $ git status
On branch main
nothing to commit, working tree clean
~/test $ code .
```

The gutter for `folder/link` shows changes, as if entire linked file is modified. The "Source Control" view and `git status` shows no changes.

![image](https://github.com/microsoft/vscode/assets/8426945/1a9dfe13-be3e-43ca-be20-12e8c8bcd0a2)


Does this issue occur when all extensions are disabled?: Yes

Related (closed) issues: https://github.com/microsoft/vscode/issues/5970#issuecomment-1625876902, https://github.com/microsoft/vscode/issues/135778, https://github.com/microsoft/vscode/issues/121304

---

VS Code version: Code 1.81.0 (6445d93c81ebe42c4cbd7a60712e0b17d9463e97, 2023-08-02T12:36:11.334Z)
OS version: Linux x64 5.19.0-50-generic (Ubuntu 22)
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|AMD Ryzen 9 3900X 12-Core Processor (24 x 2779)|
|GPU Status|2d_canvas: unavailable_software<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: disabled_software<br>multiple_raster_threads: enabled_on<br>opengl: disabled_off<br>rasterization: disabled_software<br>raw_draw: disabled_off_ok<br>video_decode: disabled_software<br>video_encode: disabled_software<br>vulkan: disabled_off<br>webgl: unavailable_software<br>webgl2: unavailable_software<br>webgpu: disabled_off|
|Load (avg)|2, 1, 1|
|Memory (System)|15.54GB (9.04GB free)|
|Process Argv|--unity-launch --crash-reporter-id 6d263987-c422-4fe5-865f-96bd74c8d7e0|
|Screen Reader|no|
|VM|0%|
|DESKTOP_SESSION|ubuntu|
|XDG_CURRENT_DESKTOP|Unity|
|XDG_SESSION_DESKTOP|ubuntu|
|XDG_SESSION_TYPE|wayland|
</details><details><summary>Extensions (24)</summary>

Extension|Author (truncated)|Version
---|---|---
project-manager|ale|12.7.0
lit-html|bie|1.11.1
firecode|ChF|1.3.0
path-intellisense|chr|2.8.4
codeium|Cod|1.2.59
vscode-eslint|dba|2.4.2
EditorConfig|Edi|0.16.4
prettier-vscode|esb|10.1.0
vscode-pull-request-github|Git|0.70.0
vscode-clangd|llv|0.1.24
rainbow-csv|mec|3.7.0
dotenv|mik|1.0.1
isort|ms-|2023.10.1
python|ms-|2023.14.0
remote-ssh|ms-|0.102.0
remote-ssh-edit|ms-|0.86.0
remote-explorer|ms-|0.4.1
sublime-keybindings|ms-|4.0.10
vsliveshare|ms-|1.0.5877
material-icon-theme|PKi|4.29.0
vscode-yaml|red|1.14.0
rewrap|stk|1.16.3
code-spell-checker|str|2.20.5
svelte-vscode|sve|107.9.0

(1 theme extensions excluded)

</details><details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30803845
282f8724:30602487
89544117:30613380
showlangstatbar:30737416
vsctsb:30748421
a2ce3375:30757347
pythonfmttext:30731395
pythoncmv:30756943
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
gsofb:30804716
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
e537b577:30795824
dsvsc013:30795093
dsvsc014:30804076

```

</details>

<!-- generated by issue reporter -->