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:
committed by
GitHub
parent
159114563b
commit
0a48519561
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user