microsoft / vscode

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

Source Control Stash Malfunction #202328

Closed Gobinath-B closed 7 months ago

Gobinath-B commented 8 months ago

Type: Bug

VS Code version: Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2, 2023-12-13T09:49:37.021Z) OS version: Windows_NT x64 10.0.22621 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i3-10110U CPU @ 2.10GHz (4 x 2592)| |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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|7.84GB (1.16GB free)| |Process Argv|--crash-reporter-id f0f6cacc-020e-44fc-8872-27a4dd1ddf48| |Screen Reader|no| |VM|0%|
Extensions (50) Extension|Author (truncated)|Version ---|---|--- vscode-tailwindcss|bra|0.10.5 npm-intellisense|chr|1.4.5 path-intellisense|chr|2.8.5 doxdocgen|csc|1.4.0 c-cpp-compile-run|dan|1.0.50 vscode-eslint|dba|2.4.2 es7-react-js-snippets|dsz|4.4.3 EditorConfig|Edi|0.16.4 vscode-npm-script|eg2|0.3.29 prettier-vscode|esb|10.1.0 vscode-pull-request-github|Git|0.78.1 search-node-modules|jas|1.3.0 better-cpp-syntax|jef|1.17.2 vscode-codemetrics|kis|1.26.1 node-module-intellisense|lei|1.5.0 vscode-azurefunctions|ms-|1.13.1 vscode-azureresourcegroups|ms-|0.8.3 isort|ms-|2023.10.1 python|ms-|2023.22.1 vscode-pylance|ms-|2023.12.1 jupyter|ms-|2023.11.1100101639 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.17 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.327.0 remote-ssh|ms-|0.108.2023112915 remote-ssh-edit|ms-|0.86.0 remote-wsl|ms-|0.81.8 azure-account|ms-|0.11.6 cmake-tools|ms-|1.16.32 cpptools|ms-|1.18.5 cpptools-extension-pack|ms-|1.3.0 remote-explorer|ms-|0.4.1 vscode-github-issue-notebooks|ms-|0.0.130 vscode-selfhost-test-provider|ms-|0.3.22 vsliveshare|ms-|1.0.5905 vsliveshare-audio|ms-|0.1.93 debugger-for-chrome|msj|4.13.0 vscode-for-node-js-development-pack|nod|2.0.1 vscode-thunder-client|ran|2.17.0 LiveServer|rit|5.7.9 es7-react-js-snippets|rod|1.9.3 code-settings-sync|Sha|3.4.3 bootstrap4-vscode|the|6.1.0 cmake|twx|0.0.17 vscode-icons|vsc|12.6.0 vscode-import-cost|wix|3.3.0 Live-Postman|wyc|1.0.1 JavaScriptSnippets|xab|1.8.0 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 vscaat:30438848 vsclangdf:30486550 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30933248 pythongtdpath:30769146 i26e3531:30792625 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2cf:30928864 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 pythontbext0:30879054 accentitlementsc:30887149 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 aa_t_chat:30882232 ```
gjsjohnmurray commented 8 months ago

Did you use the Stash Staged command, or the Stash one?

Gobinath-B commented 8 months ago

hi, I staged a single change file using gui and then stash using gui button

gjsjohnmurray commented 8 months ago

Which gui button? Is it coming from an extension? The Start Extension Bisect command can help you check.

If it is there when all extensions are disabled please paste a screenshot.

lszomoru commented 7 months ago

/gifPlease

VSCodeTriageBot commented 7 months ago

Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, .gif files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.

If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (Developer: Toggle Screencast Mode in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.

Happy coding!

Gobinath-B commented 7 months ago

https://github.com/microsoft/vscode/assets/81898167/a24474a2-6cba-48f6-8dd8-136a186c6a99

Gobinath-B commented 7 months ago

hi, i made a video. i hope it will give you an idea about this issue

gjsjohnmurray commented 7 months ago

If you only want to stash the staged file(s) you need to use Command Palette and run the Git: Stash Staged command.

Gobinath-B commented 7 months ago

here i do with ui but it behave differently

gjsjohnmurray commented 7 months ago

The UI option you used stashes everything. If you only want to stash staged you must use the command.

lszomoru commented 7 months ago

@Gobinath-B, as @gjsjohnmurray has mentioned the "Git: Stash" command will create a new git stash containing all the pending changes. In order to create a git stash containing only the staged changes you have to use the "Git: Stash Staged" command. This command is only available starting with git 2.35 so you have to make sure that your version of git is later than 2.35.

I will go ahead and close this issue but please feel free to reopen it in case you still have any questions or concerns. Thanks!