microsoft / vscode

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

COMMIT_EDITMSG is not opened on commit with no message #182412

Closed ghweeks999 closed 1 year ago

ghweeks999 commented 1 year ago

Type: Bug

In the past I was able to issue a commit with no messages and code would open the COMMIT_EDITMSG file for me to edit. On closing the file the commit would be performed. This has stopped working.

Now if I issue a commit with no message I get the error : Git: Bad Status code: 500. The command output shows:

> git -c user.useConfigOnly=true commit --quiet
Error: Bad status code: 500
    at ClientRequest.<anonymous> (c:\Users\grahamweeks\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\git-editor-main.js:1:426)
    at Object.onceWrapper (node:events:628:26)
    at ClientRequest.emit (node:events:513:28)
    at HTTPParser.parserOnIncomingClient (node:_http_client:674:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
    at Socket.socketOnData (node:_http_client:521:22)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Readable.push (node:internal/streams/readable:228:10)
error: There was a problem with the editor '"c:\Users\grahamweeks\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\git-editor.sh"'.
Please supply the message using either -m or -F option.

This may be a red-herring but at the bottom of the output I am surprised to see a reference to git-editor.sh as I am running on a Windows platform.

I have the following relevant configuration:

git config core.editor
code --wait

and code -help produces the expected results.

I have Git: Use Editor As Commit Input enabled, as well as Git: Verbose Commit

Hopefully, this is just a simple config fix.

Thanks, Graham

VS Code version: Code 1.78.2 (b3e4e68a0bc097f0ae7907b217c1119af9e03435, 2023-05-10T14:39:26.248Z) OS version: Windows_NT x64 10.0.25357 Modes: Sandboxed: Yes

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1498)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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)|31.59GB (13.16GB free)| |Process Argv|L:\\2D_Documentation\\2D_Documentation.code-workspace --crash-reporter-id 49875264-6b1f-4395-8632-e5462531aa23| |Screen Reader|no| |VM|0%|
Extensions (45) Extension|Author (truncated)|Version ---|---|--- lua-debug|act|1.61.0 preview-html|ana|1.0.0 asciidoctor-vscode|asc|2.9.8 atlascode|atl|3.0.3 azure-devops-snippets|dam|1.0.6 vscode-markdownlint|Dav|0.50.0 docs-yaml|doc|1.0.0 gitlens|eam|13.6.0 vs-code-xml-format|fab|0.1.5 codebraid-preview|gpo|0.15.0 plantuml|jeb|2.17.5 commit-lint|kol|0.0.9 restructuredtext|lex|189.3.0 azure-pipelines|ms-|1.208.0 vscode-docker|ms-|1.25.0 autopep8|ms-|2023.2.0 flake8|ms-|2023.4.0 isort|ms-|2022.8.0 python|ms-|2023.8.0 vscode-pylance|ms-|2023.5.20 jupyter|ms-|2023.4.1011241018 jupyter-keymap|ms-|1.1.0 jupyter-renderers|ms-|1.0.15 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.292.0 remote-wsl|ms-|0.78.4 azure-account|ms-|0.11.4 azurecli|ms-|0.5.0 makefile-tools|ms-|0.7.0 powershell|ms-|2023.5.0 autodocstring|njp|0.6.1 vscode-print|pdc|0.11.1 vscode-xml|red|0.25.0 vscode-yaml|red|1.12.2 luacheck|rog|1.0.0 rust-analyzer|rus|0.3.1506 code-spell-checker|str|2.20.4 emmylua|tan|0.5.13 mako|tom|0.2.0 simple-rst|tro|1.5.3 luahelper|yin|0.2.22 yog-plantuml-highlight|Yog|0.0.5 markdown-pdf|yza|1.4.4 vscode-proto3|zxh|0.5.5
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 vscoreces:30445986 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 pynewext54:30695312 azure-dev_surveyone:30548225 282f8724:30602487 pyind779:30671433 f6dab269:30613381 pythonsymbol12:30671437 showlangstatbar:30737416 vsctsb:30705553 azdwalk:30721579 pythonms35:30701012 0bg3d529:30706074 24365598:30736109 pythonfmttext:30731395 fixshowwlkth:30730052 pythongtdpathcf:30739705 ```
ghweeks999 commented 1 year ago

Forgot to state that I can see the COMMIT_EDIT MSG being created in .git when trying tto do a commit.

lszomoru commented 1 year ago

/gifPlease

vscodenpa commented 1 year 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!

Liesonge commented 1 year ago

当工作区位于网络驱动器上时,会出现这个问题,且通过在bash输入git commit来提交时会提示host和COMMIT_EDITMSG不被信任,但实际上整个工作区的文件夹都已经添加到信任文件夹了 无标题

屏幕截图 2023-05-20 152323

vscodenpa commented 1 year ago

Hey @lszomoru, this issue might need further attention.

@ghweeks999, you can help us out by closing this issue if the problem no longer exists, or adding more information.

vscodenpa commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!