Skip to content

fix(worktree): fetch via system git instead of libgit2 - #144

Closed
xiaoland wants to merge 2 commits into
mainfrom
fix/worktree-git-cli
Closed

xiaoland wants to merge 2 commits into
mainfrom
fix/worktree-git-cli

Conversation

@xiaoland

@xiaoland xiaoland commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Found by live acceptance on v0.3.0 (machine behind a local proxy, private repo): PR materialization failed in libgit2 — first no TLS stream available (fetch), then reference is not a branch (worktree add rejects remote-tracking refs) — parking the PR assignment in blocked.

Both network/checkout mutations now shell out to the configured tools.git (credential helpers + proxies work there): git fetch for the head ref, git worktree add -B for the generation-scoped branch + worktree. libgit2 keeps local read-only inspection. fmt/check/clippy/test green.

Found by live acceptance: PR worktree provisioning failed with libgit2
'no TLS stream available' on a machine behind a local proxy, and libgit2
fetch has no credential-helper integration for private repositories.
The network fetch now shells out to the configured tools.git (honors
credential helpers and proxies); libgit2 keeps the local operations
(ref lookup, worktree add).
libgit2's worktree add rejects remote-tracking references ('reference is
not a branch'); the system git creates the generation-scoped local branch
and the worktree in one step (-B for idempotent retries). git2 remains for
local inspection only.
@xiaoland

Copy link
Copy Markdown
Owner Author

Superseded: commits cherry-picked into #142 (single acceptance-fix PR).

@xiaoland xiaoland closed this Aug 31, 2026
@xiaoland
xiaoland deleted the fix/worktree-git-cli branch August 31, 2026 14:28
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.

1 participant