Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Cursor’s bundled git extension force-injects core.hooksPath=/dev/null into the
environment of every git invocation, including commit. Every git hook — pre-commit,
commit-msg, pre-push — is silently skipped when you commit from the Source Control panel.
No error, no output, exit code 0. Stock VS Code does not do this.
Steps to Reproduce
A pre-commit hook that runs a 37-second test suite. Commit from the Source Control panel
finishes in 32 ms. Output → Git shows:
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - [32ms]
Note there is no --no-verify — the command line is clean. Running that exact command line
in a terminal in the same repo runs the hook normally. So it is not the arguments; it is the
environment Cursor passes to the child process.
In Cursor.app/Contents/Resources/app/extensions/git/dist/main.js:
La = [["safe.bareRepository", "explicit"],
["core.fsmonitor", "false"],
["core.hooksPath", os.devNull],
["core.attributesFile", os.devNull]]
These are injected as GIT_CONFIG_KEY_n / GIT_CONFIG_VALUE_n / GIT_CONFIG_COUNT by the
env-building function, which ends with:
return n.command !== void 0 ? e.VSCODE_GIT_COMMAND = n.command
: delete e.VSCODE_GIT_COMMAND, Uu(e)
The n.command !== void 0 check only decides whether VSCODE_GIT_COMMAND is set. Uu(e) —
the override injection — runs unconditionally, for every command, commit included.
Because the override travels in the environment rather than as a -c flag, it never shows up
in the logged command line, which makes this very hard to diagnose.
For comparison: in stock VS Code 1.119.0, the string core.hooksPath appears 0 times in
the same extension bundle. This is Cursor-specific.
Operating System
MacOS
Version Information
Version: 3.15.6
VS Code Extension API: 1.128.0
Commit: a1f686545fd0ce8917bbd2449f733551a9bce420
Date: 2026-08-06T01:41:03.876Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Darwin arm64 24.6.0
Does this stop you from using Cursor
No - Cursor works, but with this issue