microsoft / vscode

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

vscode does not respect GIT_AUTHOR_NAME/EMAIL in pre-commit hook failures, setting git.requireGitUserConfig=false has no effect #229011

Open juliannadeau-stripe opened 1 month ago

juliannadeau-stripe commented 1 month ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. add a pre-commit hook that exits 1 (for whatever reason)
  2. do not set git config for user.name or user.email
  3. set configs using GIT_AUTHOR_NAME / GIT_AUTHOR_EMAIL
  4. Try to commit using the source control pane
  5. See error about user.name/email despite being set
image

Notes:

vs-code-engineering[bot] commented 1 month ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.93.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

juliannadeau-stripe commented 1 month ago

To respond to vs-code-engineering, I read the source code and it persists until main branch.