You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pre-commit hook leaks GIT_INDEX_FILE into linked-worktree tests #1740
This yields 249 passed and 1 failed. The same pipeline suite passes 250/250 when the repository-local Git environment is absent.
Root cause
Git exports repository-local variables such as GIT_INDEX_FILE=.git/index to hooks. The test runner inherits that value. It works while a fixture uses a normal .git directory, but git worktree add checks out into a linked worktree where .git is a file, so the inherited .git/index path is invalid.
Expected behavior
The hook should preserve Git's staged-index environment for diff-scoped linting, then clear repository-local Git variables only for the test subprocess.
Activity