Skip to content

Wrong Git diff (Working Tree/Index) is sometimes opened with "git.openDiffOnClick" disabled #228768

@yottalogical

Description

@yottalogical

Type: Bug

  1. Open a Git repository in VS Code
  2. Disable the setting git.openDiffOnClick
  3. Go to "Source Control" on the Activity Bar
  4. Stage some edited files in Git from the Source Control panel
  5. Click "Open Changes" on one of the stages files from the from the Source Control panel
  6. It should end up opening the Working Tree diff instead of the Index diff
  7. Clicking "Open Changes" on an unstaged file sometimes opens the Index diff instead of the Working Tree diff too, although this seems to happen less often in my experience

VS Code version: Code 1.93.1 (38c31bc, 2024-09-11T17:20:05.685Z)
OS version: Darwin arm64 23.6.0
Modes:

System Info
Item Value
CPUs Apple M2 Pro (12 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 3, 3, 3
Memory (System) 32.00GB (0.24GB free)
Process Argv --crash-reporter-id e726f156-e82b-4d58-93aa-c795a58953c1
Screen Reader no
VM 0%
Extensions (22)
Extension Author (truncated) Version
cucumberautocomplete ale 3.0.5
vscode-intelephense-client bme 1.12.6
vscode-eslint dba 3.0.10
gitlens eam 15.5.0
phpunit ema 4.16.1
prettier-vscode esb 9.16.0
flow-for-vscode flo 2.2.1
copilot Git 1.229.0
copilot-chat Git 0.20.1
vscode-graphql Gra 0.12.0
vscode-graphql-syntax Gra 1.3.6
autopep8 ms- 2024.0.0
debugpy ms- 2024.10.0
python ms- 2024.14.1
vscode-pylance ms- 2024.9.1
remote-containers ms- 0.384.0
vsliveshare ms- 1.0.5940
rust-analyzer rus 0.3.2112
rewrap stk 1.16.3
vscode-open-in-github sys 1.18.0
even-better-toml tam 0.19.2
errorlens use 3.20.0
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
9c06g630:31013171
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
impr_priority:31102340
nativerepl2:31139839
refactort:31108082
pythonrstrctxt:31112756
flightc:31134773
wkspc-onlycs-t:31132770
wkspc-ranged-t:31125599
fje88620:31121564
iacca1:31138162

Metadata

Metadata

Assignees

Labels

*duplicateIssue identified as a duplicate of another issue(s)gitGIT issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions