Microsoft/vscode

Git - All lines in files with 400 lines and more are shown as modified in gutter while they are not

Open

#253,704 opened on Jul 2, 2025

View on GitHub
 (16 comments) (16 reactions) (1 assignee)TypeScript (74,848 stars) (10,221 forks)batch import
buggithelp wanted

Description

Type: Bug

When I have files with around 400 lines of text or more in git repository, gutter starts to show all lines are changed, when they are actually not. For files with 300 lines and less everything is works as expected.

Does this issue occur when all extensions are disabled?

  • Yes (reproduced with code --disable-extensions)
  • No

Steps to Reproduce

  1. Clone the minimal repro repository (https://github.com/mlesin/vscode_scm_bug.git) or create a new Git repo with committed file containing ≥ 400 lines.
  2. Ensure git status is clean.
  3. Open the file in VS Code editor.
  4. Observe the gutter decorations.

Expected Behaviour

The gutter should show no modified lines when the file content is identical to the index/HEAD.

Actual Behaviour

The Git Local Changes (Working Tree) layer paints every line as modified, even though git status is clean.

Screenshots

File with 400 lines, note all lines shown as changed: Image

File with 300 lines in the same repo, everything is fine: Image

Additional Information

  • Issue reproduces both locally and inside Dev Containers / Remote‑SSH.
  • Setting git config --global core.autocrlf input and keeping .gitattributes (* text eol=lf) does not resolve the problem.
  • Setting diffEditor.diffAlgorithm to legacy does not resolve the problem
  • I see this behavior only in on Linux (Ubuntu 24.04), tried on different machines.
  • On Windows and MacOS everything works as expected.

Thank you for your hard work! If more info or a full repo dump is required, feel free to ask.

VS Code version: Code 1.101.2 (2901c5ac6db8a986a5666c3af51ff804d05af0d4, 2025-06-24T20:27:15.391Z) OS version: Linux x64 6.8.0-62-generic Modes:

Item Value
CPUs 12th Gen Intel(R) Core(TM) i9-12900KF (24 x 4900)
GPU Status 2d_canvas: enabledcanvas_oop_rasterization: enabled_ondirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_graphite: disabled_offvideo_decode: enabledvideo_encode: disabled_softwarevulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: disabled_offwebnn: disabled_off
Load (avg) 1, 1, 1
Memory (System) 125.62GB (108.34GB free)
Process Argv --crash-reporter-id e359f71a-98d0-4d0d-a7c7-fb6c9ec2768d
Screen Reader no
VM 0%
DESKTOP_SESSION plasma
XDG_CURRENT_DESKTOP KDE
XDG_SESSION_DESKTOP KDE
XDG_SESSION_TYPE x11
Extension Author (truncated) Version
vscode-base64 ada 0.1.0
auto-add-brackets ali 0.12.2
vscode-zipfs arc 3.0.0
arkdark ark 6.6.0
toml be5 0.6.0
vscode-hex-pm-intellisense ben 0.5.0
markdown-checkbox bie 0.4.0
markdown-emoji bie 0.3.1
markdown-footnotes bie 0.1.1
markdown-mermaid bie 1.28.0
markdown-preview-github-styles bie 2.2.0
markdown-yaml-preamble bie 0.1.0
mermaid-markdown-syntax-highlighting bpr 1.7.4
vscode-tailwindcss bra 0.14.23
vscode-casbin Cas 0.0.2
npm-intellisense chr 1.4.5
path-intellisense chr 2.10.0
vscode-css-modules cli 0.5.4
gitignore cod 0.10.0
doxdocgen csc 1.4.0
meld-diff dan 1.5.1
vscode-eslint dba 3.0.10
docker doc 0.11.0
githistory don 0.6.20
xml Dot 2.5.1
sort-lines-by-selection ear 1.2.0
vscode-html-css ecm 2.0.13
EditorConfig Edi 0.17.4
prettier-vscode esb 11.0.0
dependi fil 0.7.15
auto-rename-tag for 0.1.10
shell-format fox 7.2.5
copilot Git 1.338.0
copilot-chat Git 0.28.5
cmake-integration-vscode go2 0.7.1
vscode-graphql Gra 0.13.2
vscode-graphql-syntax Gra 1.3.8
todo-tree Gru 0.0.226
haskell has 2.6.0
vscode-test-explorer hbe 2.22.1
rest-client hum 0.25.1
output-colorizer IBM 0.1.2
path-autocomplete ion 1.25.0
vscode-edit-csv jan 0.11.4
plantuml jeb 2.18.1
better-cpp-syntax jef 1.27.1
svg joc 1.5.4
cmake-language-support-vscode jos 0.0.9
language-haskell jus 3.6.0
vscode-python-test-adapter lit 0.8.2
git-graph mhu 1.30.0
import-sorter mik 3.3.1
dotenv mik 1.0.1
ecdc mit 1.8.0
thrift-syntax-support mrk 0.0.12
vscode-duplicate mrm 1.2.1
language-gettext mro 0.5.0
vscode-containers ms- 2.0.3
vscode-docker ms- 2.0.0
vscode-dotnet-runtime ms- 2.3.6
vscode-pgsql ms- 1.6.0
black-formatter ms- 2025.2.0
debugpy ms- 2025.8.0
isort ms- 2025.0.0
python ms- 2025.8.0
vscode-pylance ms- 2025.6.2
remote-containers ms- 0.417.0
remote-ssh ms- 0.121.2025063015
remote-ssh-edit ms- 0.87.0
remote-wsl ms- 0.99.0
vscode-remote-extensionpack ms- 0.26.0
cmake-tools ms- 1.20.53
cpptools ms- 1.26.3
cpptools-extension-pack ms- 1.3.1
remote-explorer ms- 0.6.2025063009
remote-server ms- 1.5.2
test-adapter-converter ms- 0.2.1
vscode-speech ms- 0.16.0
vscode-speech-language-pack-ru-ru ms- 0.5.0
vscode-websearchforcopilot ms- 0.1.2
windows-ai-studio ms- 0.16.0
back-n-forth nic 3.1.1
rust-macro-expand Odi 1.0.0
vscode-commons red 0.0.6
vscode-xml red 0.29.0
vscode-yaml red 1.18.0
bash-debug rog 0.3.9
rust-analyzer rus 0.3.2519
online-help sal 0.2.8
jinjahtml sam 0.20.0
semanticdiff sem 0.10.0
bash-beautify sha 0.1.1
markdown-preview-enhanced shd 0.8.18
vscode-wl shi 1.7.3
vite Sim 1.0.4
just ske 2.0.0
vscode-taskexplorer spm 2.13.2
external-formatters Ste 0.2.0
vscode-rust-test-adapter Swe 0.11.0
sass-indented syl 1.8.33
hex-lens szT 0.0.2
even-better-toml tam 0.21.2
vscode-markdown-paste-image tel 1.4.3
shellcheck tim 0.37.7
graphviz-interactive-preview tin 0.3.5
es6-string-html Tob 2.17.0
vscode-json-stable-stringify Tra 1.3.0
vscode-mdx uni 1.8.15
errorlens use 3.26.0
vscode-lldb vad 1.11.5
intellicode-api-usage-examples Vis 0.2.9
vscodeintellicode Vis 1.3.2
vscode-mermaid-preview vst 2.1.1
volar Vue 3.0.1
gitblame wad 11.1.4
salt-lint war 0.1.0
saltstack-extension-pack war 0.0.2
vscode-todo-highlight way 1.0.5
vscode-nginx wil 0.7.2
vscode-mdx-preview xyc 0.3.3
markdown-all-in-one yzh 3.6.3

(2 theme extensions excluded)

vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
pythonrstrctxt:31112756
nativeloc1:31192215
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31333650
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
c7cif404:31314491
pythonpulldiagcf:31335740
996jf627:31283433
pythonrdcb7cf:31303019
usemplatestapi:31297334
0aa6g176:31307128
7bj51361:31289155
747dc170:31275177
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
pylancequickfixf:31329273
9d2cg352:31339597
jhi8h917:31338107
i851h500:31338111
usemarketplace:31336439
nesew2to5:31336538
agentclaude:31335815
nes-diff-11:31337487
6abeh943:31336334
yijiwantestdri0626-c:31336931
hi92a955:31337023

Contributor guide