microsoft / vscode

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

Files changes not recognized on Git branch without manual intervention #101507

Closed prryplatypus closed 4 years ago

prryplatypus commented 4 years ago

Issue Type: Bug

When making a change to any file in the project it doesn't show up in the Source Control tab on the left sidebar, unless I close and reopen VS Code or manually click on "Synchronize Changes". In addition, changed files are no longer shown on a different colour, even after manually synchronizing changes or closing and reopening VS Code. Autorefresh option is enabled. Happens with all extensions disabled too.

Possible duplicate of #101493, but submitting a new issue as instructed by @joaomoreno.

VS Code version: Code 1.46.1 (cd9ea6488829f560dc949a8b2fb789f3cdc05f5d, 2020-06-17T21:13:20.174Z) OS version: Windows_NT x64 10.0.18363

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 7 3800X 8-Core Processor (16 x 3900)| |GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|31.95GB (23.51GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
Extensions (8) Extension|Author (truncated)|Version ---|---|--- vcard|cst|1.0.1 discord-vscode|icr|3.14.0 python|ms-|2020.6.91350 vetur|oct|0.24.0 laravel-blade|one|1.22.1 material-icon-theme|PKi|4.2.0 laravel-helpers|raf|0.2.2 phpdoc-comment-vscode-plugin|rex|1.3.0 (1 theme extensions excluded)
joaomoreno commented 4 years ago

You seem to be missing file events. Please go through the following steps:

  1. Run Git: Set Log Level... and choose Trace
  2. Run Git: Show Git Output
  3. Reproduce the issue and wait 10-20 seconds
  4. Paste the whole output here
prryplatypus commented 4 years ago

Edited file content, saved, waited for 30 seconds. No output at all other than:

Log level changed to: Trace

After clicking on "synchronize changes", this was the output:

Log level changed to: Trace
> git pull --tags origin master
[debug] [.git] Change: h:\VATSIM\Development\VATSIM Discord\Web\.git\FETCH_HEAD
> git rev-parse --show-toplevel
[debug] [.git] Change: h:\VATSIM\Development\VATSIM Discord\Web\.git\FETCH_HEAD
[debug] [.git] Change: h:\VATSIM\Development\VATSIM Discord\Web\.git\ORIG_HEAD.lock
[debug] [.git] Change: h:\VATSIM\Development\VATSIM Discord\Web\.git\ORIG_HEAD.lock
[debug] [.git] Change: h:\VATSIM\Development\VATSIM Discord\Web\.git\ORIG_HEAD
[debug] [.git] Change: h:\VATSIM\Development\VATSIM Discord\Web\.git\ORIG_HEAD.lock
[debug] [.git] Change: h:\VATSIM\Development\VATSIM Discord\Web\.git\ORIG_HEAD
From github.com:nepetadosmil/vatsim-discord-website
 * branch            master     -> FETCH_HEAD
> git status -z -u
> git symbolic-ref --short HEAD
> git rev-parse master
> git rev-parse --symbolic-full-name master@{u}
> git rev-list --left-right master...refs/remotes/origin/master
> git for-each-ref --format %(refname) %(objectname) --sort -committerdate
> git remote --verbose
> git config --get commit.template
> git rev-parse --show-toplevel
joaomoreno commented 4 years ago

Is H: a network share?

prryplatypus commented 4 years ago

Negative. It’s a secondary drive in my machine.

Demitroi commented 4 years ago

I have the same issue.

vscode version: 1.46.1 git version: 2.27.0.windows.1

I installed the git for windows portable versión. https://git-scm.com/download/win

The install path is E:\public\git-portable E:\ is a physical drive,

I added this to settings.json

"terminal.integrated.shell.windows": "E:\\public\\git-portable\\bin\\bash.exe",
"git.path": "E:\\public\\git-portable\\bin\\git.exe"

By editing a file the output is the next.

Looking for git in: E:\public\git-portable\bin\git.exe
Using git 2.27.0.windows.1 from E:\public\git-portable\bin\git.exe
> git rev-parse --show-toplevel
> git rev-parse --git-dir
Open repository: e:\sergio\go\sait.mx\tiendaweb
> git status -z -u
> git symbolic-ref --short HEAD
> git rev-parse ajustes-sync
> git rev-parse --symbolic-full-name ajustes-sync@{u}
> git rev-list --left-right ajustes-sync...refs/remotes/origin/ajustes-sync
> git for-each-ref --format %(refname) %(objectname) --sort -committerdate
> git remote --verbose
> git config --get commit.template
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
Log level changed to: Trace
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel

After click the refresh button.

imagen

The log is the next.

Looking for git in: E:\public\git-portable\bin\git.exe
Using git 2.27.0.windows.1 from E:\public\git-portable\bin\git.exe
> git rev-parse --show-toplevel
> git rev-parse --git-dir
Open repository: e:\sergio\go\sait.mx\tiendaweb
> git status -z -u
> git symbolic-ref --short HEAD
> git rev-parse ajustes-sync
> git rev-parse --symbolic-full-name ajustes-sync@{u}
> git rev-list --left-right ajustes-sync...refs/remotes/origin/ajustes-sync
> git for-each-ref --format %(refname) %(objectname) --sort -committerdate
> git remote --verbose
> git config --get commit.template
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
Log level changed to: Trace
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git status -z -u
> git symbolic-ref --short HEAD
> git rev-parse ajustes-sync
> git rev-parse --symbolic-full-name ajustes-sync@{u}
> git rev-list --left-right ajustes-sync...refs/remotes/origin/ajustes-sync
> git for-each-ref --format %(refname) %(objectname) --sort -committerdate
> git remote --verbose
> git config --get commit.template
> git status -z -u
> git symbolic-ref --short HEAD
> git rev-parse ajustes-sync
> git rev-parse --symbolic-full-name ajustes-sync@{u}
> git rev-list --left-right ajustes-sync...refs/remotes/origin/ajustes-sync
> git for-each-ref --format %(refname) %(objectname) --sort -committerdate
> git remote --verbose
> git config --get commit.template
> git check-ignore -v -z --stdin

The changes in the source control are now showing.

imagen

joaomoreno commented 4 years ago

@nepetadosmil Can you reproduce in other repositories?

prryplatypus commented 4 years ago

I could reproduce it with all other repositories I tried indeed. Anyway, I have not changed anything in my system or in my settings and it seems to be working perfectly again. I am clueless as to why this happened for a few days right after updating to the latest version and without me changing anything it suddenly started working again.

Thanks for your help. Please let me know if I can provide you with any more information.

P.D.: Leaving the issue open since I am 100% sure nothing changed in my system and I seem to not be the only one who has experienced this issue. Feel free to close if necessary.

adrianghc commented 4 years ago

I'm having this same problem:

When making a change to any file in the project it doesn't show up in the Source Control tab on the left sidebar, unless I close and reopen VS Code or manually click on "Synchronize Changes"

However, I do not have this problem:

In addition, changed files are no longer shown on a different colour, even after manually synchronizing changes or closing and reopening VS Code.

I'm working in a Remote WSL workspace from Windows 10 2004. My VS Code version is 1.47.0 and my Git version is 2.17.1 on Ubuntu 18.04. I can provide any other kind of information.

adrianghc commented 4 years ago

At least in my case, the problem occurs only when opening a Windows directory from WSL. I've opened a separate issue (#102243) as in my case there is another problem that is linked to this one.

joaomoreno commented 4 years ago

I could reproduce it with all other repositories I tried indeed. Anyway, I have not changed anything in my system or in my settings and it seems to be working perfectly again. I am clueless as to why this happened for a few days right after updating to the latest version and without me changing anything it suddenly started working again.

Got it, closing it let me know if it comes back.