microsoft / vscode

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

"Revert Change" button in Git local working changes window multiplies the line #176407

Closed jtilahun closed 1 year ago

jtilahun commented 1 year ago

Type: Bug

  1. Open a file with a one-line difference in Git.
  2. Click on the thin bar on the left-hand edge of the window where the file is open.
  3. On the pop-up window, click the "Revert Change" arrow (the arrow that points counterclockwise).

Expected result: the change on that line will revert, resulting in changes disappearing. Actual result: the old version of that line is added, and also the new version of that line multiplies.

VS Code version: Code 1.76.0 (92da9481c0904c6adfe372c12da3b7748d74bdcb, 2023-03-01T10:25:16.105Z) OS version: Linux x64 5.14.0-1057-oem snap Modes: Sandboxed: No

https://user-images.githubusercontent.com/26139374/223486882-18217952-b1ed-435b-933c-89e55a7371fb.mp4

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 x 1800)| |GPU Status|2d_canvas: disabled_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: disabled_off
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: disabled_off
webgl2: disabled_off
webgpu: disabled_off| |Load (avg)|2, 2, 2| |Memory (System)|15.37GB (4.57GB free)| |Process Argv|--no-sandbox --force-user-env --unity-launch --crash-reporter-id 5584e4f1-2151-42ff-b9c0-05c17b5d229d| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|ubuntu| |XDG_CURRENT_DESKTOP|Unity| |XDG_SESSION_DESKTOP|ubuntu| |XDG_SESSION_TYPE|x11|
Extensions (28) Extension|Author (truncated)|Version ---|---|--- doxdocgen|csc|1.4.0 gitlens|eam|13.3.2 vscode-pull-request-github|Git|0.60.0 better-cpp-syntax|jef|1.17.2 isort|ms-|2022.8.0 python|ms-|2023.4.0 vscode-pylance|ms-|2023.3.10 jupyter|ms-|2023.2.1000592019 jupyter-keymap|ms-|1.1.0 jupyter-renderers|ms-|1.0.15 vscode-jupyter-cell-tags|ms-|0.1.6 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.282.0 remote-ssh|ms-|0.98.0 remote-ssh-edit|ms-|0.84.0 remote-wsl|ms-|0.76.1 cmake-tools|ms-|1.13.45 cpptools|ms-|1.14.4 cpptools-extension-pack|ms-|1.3.0 remote-explorer|ms-|0.2.0 vsliveshare|ms-|1.0.5834 vsliveshare-audio|ms-|0.1.93 veriloghdl|msh|1.11.1 proto|pet|0.0.2 jinjahtml|sam|0.20.0 rewrap|stk|1.16.3 code-spell-checker|str|2.19.0 even-better-toml|tam|0.19.0 (1 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdc:30486549 c4g48928:30535728 dsvsc012cf:30540253 azure-dev_surveyone:30548225 vsccc:30610678 pyindex848:30662994 nodejswelcome1:30587005 3biah626:30602489 pyind779:30671433 89544117:30613380 pythonsymbol12:30671437 a9j8j154:30646983 6233i204:30672705 pythonb192:30669360 pythonms35:30676800 ```
gjsjohnmurray commented 1 year ago

/duplicate of #176051

VSCodeTriageBot commented 1 year ago

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!