Skip to content

core: implement git adapter with worktree management (T0.6) - #3

Merged
alejandro-nexcade merged 1 commit into
mainfrom
alejandro/t0.6-git-adapter
Jun 28, 2026
Merged

core: implement git adapter with worktree management (T0.6)#3
alejandro-nexcade merged 1 commit into
mainfrom
alejandro/t0.6-git-adapter

Conversation

@alejandro-nexcade

Copy link
Copy Markdown
Collaborator

Summary

  • Implements adapters/git.rs with ensure_worktree (supports stacked bases), reconcile, and prune_worktree via git2
  • Restack stubbed as Error::RestackNotImplemented for Phase 3
  • Added git2 and tempfile as workspace dependencies

Test plan

  • 11 tests against real scratch git repos (no mocks): create, stacked base, already-exists, bad base, reconcile after commit, prune, multiple worktrees, branch preservation
  • cargo fmt, cargo clippy -- -D warnings, cargo test --all green

🤖 Generated with Claude Code

Add adapters/git.rs with ensure_worktree (creates worktree from base
branch, supports stacked PRs), reconcile (re-reads HEAD after agent
work), and prune_worktree (removes on Merged). Restack stubbed for
Phase 3. Eleven tests against real scratch git repos cover create,
stack, prune, reconcile, and error cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@LifeLex
LifeLex force-pushed the alejandro/t0.6-git-adapter branch from 05f4992 to ef17f57 Compare June 28, 2026 11:19
@alejandro-nexcade
alejandro-nexcade changed the base branch from alejandro/t0.2-domain-model to main June 28, 2026 11:19
@alejandro-nexcade
alejandro-nexcade merged commit 48d82a0 into main Jun 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants