[PR #582] Add comprehensive worktree support across wrapper/hooks/both modes #588

Closed
opened 2026-03-02 04:14:03 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/582

State: closed
Merged: Yes


Summary

  • add worktree-aware repository resolution, including --git-common-dir handling and isolated per-worktree storage paths
  • route checkpoint/runtime storage through repository-derived storage config so worktree context is respected end-to-end
  • align blame boundary/hash formatting with git behavior in worktree contexts
  • add dedicated tests/worktrees.rs integration coverage (33 tests across wrapper/hooks/both)
  • add worktree_test_wrappers! macro and harness updates for worktree-mode repo construction
  • add worktree snapshots for initial attributions and stats in wrapper/hooks/both modes
  • harden hooks/test isolation for global config + DB env handling (GITAI_TEST_DB_PATH fallback, hooks-mode config/db determinism)
  • include windows-oriented path/config isolation fixes used by the worktree tests

Validation

  • cargo test --test worktrees -- --test-threads=8
  • cargo test -q -- --test-threads=8
  • GIT_AI_TEST_GIT_MODE=hooks cargo test -q -- --test-threads=8
  • GIT_AI_TEST_GIT_MODE=both cargo test -q -- --test-threads=8

Open with Devin
**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/582 **State:** closed **Merged:** Yes --- ## Summary - add worktree-aware repository resolution, including `--git-common-dir` handling and isolated per-worktree storage paths - route checkpoint/runtime storage through repository-derived storage config so worktree context is respected end-to-end - align blame boundary/hash formatting with git behavior in worktree contexts - add dedicated `tests/worktrees.rs` integration coverage (33 tests across wrapper/hooks/both) - add `worktree_test_wrappers!` macro and harness updates for worktree-mode repo construction - add worktree snapshots for initial attributions and stats in wrapper/hooks/both modes - harden hooks/test isolation for global config + DB env handling (`GITAI_TEST_DB_PATH` fallback, hooks-mode config/db determinism) - include windows-oriented path/config isolation fixes used by the worktree tests ## Validation - `cargo test --test worktrees -- --test-threads=8` - `cargo test -q -- --test-threads=8` - `GIT_AI_TEST_GIT_MODE=hooks cargo test -q -- --test-threads=8` - `GIT_AI_TEST_GIT_MODE=both cargo test -q -- --test-threads=8` <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/git-ai-project/git-ai/pull/582" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->
kerem 2026-03-02 04:14:03 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#588
No description provided.