源代码控制图标闪烁

问题描述 投票:0回答:1

Visual Studio Code 的

Source Control
图标每 3 秒闪烁一次。下面的 GIF 已被加速...

当我在运行命令后查看输出时

Git: Show Git Output
,它似乎不仅仅只是获取状态,而且第二个命令实际上失败了。

git status -z -uall
git config --get commit.template 
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 

在命令行上运行后

git config ...
失败:

如何解决这个问题?


  • VS代码版本:1.77.1
  • Git 版本:2.33.1.windows.1

这两个都是截至本文的最新版本

  • 禁用所有扩展并查看源代码控制部分会显示以下内容:
git visual-studio-code git-commit
1个回答
0
投票

在我的例子中,原因是工作树中附加了一个文件(日志文件)。 3 秒似乎是

git
插件获取文件更改通知的时间间隔。虽然整个目录都在
.gitignore
中,但插件没有考虑到这一点(这里您只能看到
.git
下的更改被过滤)。

要查找触发刷新的文件,请在 vscode 中设置

Developer: Set Log Level...
->
Git
->
Debug
,然后检查
Git
输出。

© www.soinside.com 2019 - 2024. All rights reserved.