feat(context): centralize RepoContext API for git operations (#1102)

Centralizes repository context resolution via RepoContext API, fixing bugs where git commands run in the wrong repo when BEADS_DIR points elsewhere or in worktree scenarios.
This commit is contained in:
Peter Chanthamynavong
2026-01-15 07:55:08 -08:00
committed by GitHub
parent 159114563b
commit 0a48519561
33 changed files with 3211 additions and 327 deletions

View File

@@ -201,8 +201,8 @@ Use --merge to merge the sync branch back to main branch.`,
if err := ensureStoreActive(); err == nil && store != nil {
if sb, _ := syncbranch.Get(ctx, store); sb != "" {
syncBranchName = sb
if rr, err := syncbranch.GetRepoRoot(ctx); err == nil {
syncBranchRepoRoot = rr
if rc, err := beads.GetRepoContext(); err == nil {
syncBranchRepoRoot = rc.RepoRoot
}
}
}