test: tests fail for developers with global git hooks #6484

Open
opened 2026-02-16 18:04:21 -05:00 by yindo · 1 comment
Owner

Originally created by @assagman on GitHub (Jan 16, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Tests fail for developers who have global git hooks configured (e.g., sign-off requirements via commit-msg or prepare-commit-msg hooks).

When a developer has hooks configured globally in ~/.config/git/hooks/ or via core.hooksPath, these hooks are picked up by the test fixture git repositories, causing unexpected test failures.

Steps to reproduce

  1. Configure a global git hook (e.g., sign-off requirement)
  2. Run bun test in packages/opencode
  3. Observe test failures related to git operations

Expected behavior

Tests should run in an isolated environment and not be affected by developer's local git configuration.

Fix

Resolved in #8898 - Test fixtures now use isolated git config and an empty hooks directory.


OpenCode version: 0.0.0-dev-202601161353
OS: macOS Tahoe 26.3 arm64
Terminal: ghostty 1.2.3, tmux next-3.5

Originally created by @assagman on GitHub (Jan 16, 2026). Originally assigned to: @rekram1-node on GitHub. ## Description Tests fail for developers who have global git hooks configured (e.g., sign-off requirements via `commit-msg` or `prepare-commit-msg` hooks). When a developer has hooks configured globally in `~/.config/git/hooks/` or via `core.hooksPath`, these hooks are picked up by the test fixture git repositories, causing unexpected test failures. ## Steps to reproduce 1. Configure a global git hook (e.g., sign-off requirement) 2. Run `bun test` in packages/opencode 3. Observe test failures related to git operations ## Expected behavior Tests should run in an isolated environment and not be affected by developer's local git configuration. ## Fix Resolved in #8898 - Test fixtures now use isolated git config and an empty hooks directory. --- **OpenCode version:** 0.0.0-dev-202601161353 **OS:** macOS Tahoe 26.3 arm64 **Terminal:** ghostty 1.2.3, tmux next-3.5
Author
Owner

@github-actions[bot] commented on GitHub (Jan 16, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #6553: opencode modifies git index when executed in prepare-commit-msg hook

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 16, 2026): This issue might be a duplicate of existing issues. Please check: - #6553: opencode modifies git index when executed in prepare-commit-msg hook Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6484