microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.57k stars 29.01k forks source link

SCM Diff decorations not working #184638

Open ramses-lopez-morningstar opened 1 year ago

ramses-lopez-morningstar commented 1 year ago

Type: Bug

Fresh VSCode install, working on a ruby on rails codebase on WSL2 (ubuntu linux 2020).

Tried rebooting, turning the feature on/off on the settings, reinstalling.

Works as expected on the latest stable release.

Version: 1.79.0-insider (user setup) Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302 Date: 2023-06-07T14:26:54.152Z Electron: 22.5.5 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.19044

VS Code version: Code - Insiders 1.79.0-insider (b380da4ef1ee00e224a15c1d4d9793e27c2b6302, 2023-06-07T14:26:54.152Z) OS version: Windows_NT x64 10.0.19044 Modes: Remote OS version: Linux x64 5.4.72-microsoft-standard-WSL2

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz (12 x 2592)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.73GB (10.55GB free)| |Process Argv|--crash-reporter-id c6eff9ac-b5d8-4ff2-990f-1b115d889870| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|WSL: Ubuntu-20.04| |OS|Linux x64 5.4.72-microsoft-standard-WSL2| |CPUs|Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz (12 x 2592)| |Memory (System)|24.84GB (21.85GB free)| |VM|0%|
Extensions (10) Extension|Author (truncated)|Version ---|---|--- remote-wsl|ms-|0.79.4 remote-explorer|ms-|0.5.2023060509 remote-server|ms-|1.3.2023060809 haml|vay|1.0.1 vim|vsc|1.25.2 gitlens|eam|2023.6.810 copilot-chat|Git|0.3.2023060801 copilot-nightly|Git|1.88.144 vscode-pull-request-github|Git|0.67.2023060813 ruby-lsp|Sho|0.3.1
A/B Experiments ``` vsliv695:30137379 vsins829:30139715 vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythontb:30258533 pythonptprofiler:30281269 vshan820:30294714 vscod805cf:30301675 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30404738 cppdebug:30492333 vsclangdf:30492506 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30618038 pylantcb52:30590116 pyind779:30611226 pythonsymbol12:30651887 a9j8j154:30646983 showlangstatbar:30737417 pythonms35:30671666 03d35959:30757351 7ij38806:30687742 pythonfmttext:30716741 pythoncmvfstr:30726892 fixhidewlkth:30724384 hidesbindicator:30724476 pythongtdpath:30726887 pythonnosmt12:30757129 ```
starball5 commented 1 year ago

Related past issue (1.76.1): #176738 (and related on Stack Overflow: https://stackoverflow.com/q/75715788/11107541)

lszomoru commented 1 year ago

/gifPlease

vscodenpa commented 1 year ago

Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, .gif files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.

If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (Developer: Toggle Screencast Mode in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.

Happy coding!

astroboylrx commented 1 year ago

I have the same issue. SCM diff gutter color-lines are not showing. I already turned it on in the settings.

Changes are shown correct if I open the diff window image

However, in the editor window, no color lines are shown in the gutter image

I found nothing suspicious in the Git log:

2023-07-04 01:16:38.674 [info] Log level: Info
2023-07-04 01:16:38.674 [info] Validating found git in: "git"
2023-07-04 01:16:38.674 [info] Using git "2.34.1" from "git"
2023-07-04 01:16:38.674 [info] > git rev-parse --show-toplevel [117ms]
2023-07-04 01:16:38.742 [info] > git rev-parse --git-dir --git-common-dir [59ms]
2023-07-04 01:16:38.766 [info] Open repository: /mnt/c/Users/astro/projects/GitHub/InDiskBinary
2023-07-04 01:16:38.831 [info] > git rev-parse --show-toplevel [52ms]
2023-07-04 01:16:38.879 [info] > git config --get commit.template [63ms]
2023-07-04 01:16:39.095 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [238ms]
2023-07-04 01:16:39.423 [info] > git status -z -uall [314ms]
2023-07-04 01:16:39.491 [info] > git config --get commit.template [51ms]
2023-07-04 01:16:39.680 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [221ms]
2023-07-04 01:16:39.907 [info] > git status -z -uall [218ms]
2023-07-04 01:16:41.621 [info] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [148ms]
2023-07-04 01:17:10.728 [info] > git rev-parse --show-toplevel [44ms]
2023-07-04 01:17:21.931 [info] > git rev-parse --show-toplevel [44ms]
2023-07-04 01:17:21.982 [info] > git rev-parse --show-toplevel [45ms]
2023-07-04 01:17:48.125 [info] > git rev-parse --show-toplevel [42ms]
2023-07-04 01:17:48.174 [info] > git rev-parse --show-toplevel [44ms]
2023-07-04 01:18:01.296 [info] > git rev-parse --show-toplevel [42ms]
2023-07-04 01:18:01.342 [info] > git rev-parse --show-toplevel [41ms]
2023-07-04 01:18:16.505 [info] > git rev-parse --show-toplevel [35ms]
2023-07-04 01:21:25.202 [info] > git rev-parse --show-toplevel [40ms]
2023-07-04 01:21:26.826 [info] > git rev-parse --show-toplevel [37ms]
2023-07-04 01:21:32.844 [info] > git rev-parse --show-toplevel [42ms]
2023-07-04 01:21:48.966 [info] > git rev-parse --show-toplevel [35ms]
2023-07-04 01:21:49.491 [info] > git check-ignore -v -z --stdin [51ms]
2023-07-04 01:21:51.462 [info] > git ls-tree -l HEAD -- /mnt/c/Users/astro/projects/GitHub/InDiskBinary/analyst_scripts.py [86ms]
2023-07-04 01:21:51.542 [info] > git show --textconv HEAD:analyst_scripts.py [173ms]
2023-07-04 01:21:51.936 [info] > git check-ignore -v -z --stdin [47ms]
2023-07-04 01:22:04.112 [info] > git rev-parse --show-toplevel [41ms]
2023-07-04 01:22:05.511 [info] > git ls-tree -l HEAD -- /mnt/c/Users/astro/projects/GitHub/InDiskBinary/analyst_scripts.py [137ms]
2023-07-04 01:22:07.733 [info] > git rev-parse --show-toplevel [49ms]
2023-07-04 01:22:19.371 [info] > git ls-tree -l HEAD -- /mnt/c/Users/astro/projects/GitHub/InDiskBinary/analyst_scripts.py [153ms]
2023-07-04 01:22:55.820 [info] > git ls-tree -l HEAD -- /mnt/c/Users/astro/projects/GitHub/InDiskBinary/analyst_scripts.py [125ms]
2023-07-04 01:23:05.839 [info] > git ls-tree -l HEAD -- /mnt/c/Users/astro/projects/GitHub/InDiskBinary/analyst_scripts.py [128ms]
2023-07-04 01:23:40.290 [info] > git rev-parse --show-toplevel [37ms]
2023-07-04 01:23:45.939 [info] > git ls-tree -l HEAD -- /mnt/c/Users/astro/projects/GitHub/InDiskBinary/analyst_scripts.py [160ms]
2023-07-04 01:23:47.122 [info] > git rev-parse --show-toplevel [42ms]
2023-07-04 01:23:52.065 [info] > git ls-tree -l HEAD -- /mnt/c/Users/astro/projects/GitHub/InDiskBinary/analyst_scripts.py [184ms]
2023-07-04 01:24:18.524 [info] > git ls-tree -l HEAD -- /mnt/c/Users/astro/projects/GitHub/InDiskBinary/analyst_scripts.py [140ms]
2023-07-04 01:25:12.787 [info] > git ls-tree -l HEAD -- /mnt/c/Users/astro/projects/GitHub/InDiskBinary/analyst_scripts.py [123ms]
2023-07-04 01:25:14.696 [info] > git rev-parse --show-toplevel [41ms]
2023-07-04 01:26:27.457 [info] > git rev-parse --show-toplevel [43ms]
2023-07-04 01:26:30.146 [info] > git rev-parse --show-toplevel [48ms]
2023-07-04 01:26:30.234 [info] > git rev-parse --show-toplevel [81ms]

Version: 1.79.2 (user setup) Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06 Date: 2023-06-14T08:57:04.379Z Electron: 22.5.7 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.22631

PS: The same feature works fine on my Mac machine.

lszomoru commented 1 year ago

@astroboylrx, are there any symbolic links on the path to the folder/workspace that you have opened in VS Code? If so, could you try the latest VS Code Insiders release as we have made some improvements to support repositories that have symbolic links on their path.

vscodenpa commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

keithlee96 commented 1 year ago

I'm still getting this issue today in VS Code version 1.81.1 where the gutters don't appear. It's the same issue described in these stack overflow posts:

https://stackoverflow.com/questions/75709132/why-arent-scm-diff-decorations-showing-in-the-vs-code-gutter-in-vs-code-1-76-1 https://stackoverflow.com/questions/75715788/why-arent-scm-diff-decorations-showing-in-the-gutter-in-vs-code-1-76-1 https://stackoverflow.com/questions/75739688/visual-studio-code-file-change-annotations-disappeared

Edit: I accidentally mistyped 1.18.1 instead of 1.81.1 originally. Have corrected it in the above text.

starball5 commented 1 year ago

I'm still getting this issue today in VS Code version 1.18.1 where the gutters don't appear. It's the same issue described in these stack overflow posts:

@keithlee96 Uh... did you actually mean 1.81.1? Or are you actually using the October 2017 release?

sharadhr commented 1 year ago

I am also unable to see gutter decorations for some files in my repository, and I'm running VS Code 1.81.1–same as @keithlee96 (assuming their 1.18.1 was a typo). The .gitignore, however, shows the gutter decorations.


EDIT: turns out the files with non-working gutter decorations are either symlinks, or files in a symlinked directory.

lszomoru commented 1 year ago

@sharadhr, could you please share more details about the folder/workspace where you are able to reproduce the issue? Is the git repository root a symbolic link, or is the symbolic link inside the git repository? Thanks!

sharadhr commented 1 year ago

@lszomoru:

The git repository is a normal directory. The symbolic link is inside the repository, and links to another subdirectory of the repository.

I have the following structure, essentially:

$  tree -a repo -L 2
repo
├── .git
│   ├── COMMIT_EDITMSG
│   ├── FETCH_HEAD
│   ├── HEAD
│   ├── config
│   ├── description
│   ├── hooks
│   ├── index
│   ├── info
│   ├── logs
│   ├── objects
│   └── refs
├── linkdir -> subdir
└── subdir
    └── test.cpp

9 directories, 7 files

If I open repo/linkdir/test.cpp and make some changes, VS Code does not display gutter SCM decorations.

An illustrative image:

image

Notice the green line in the gutter on the left source editor, and no green line in the right.

It isn't just gutter decorations; it appears that all SCM functionality in the code editor in a symlinked file doesn't work, including things like line blame and history.