mirror of
https://github.com/stablyai/orca
synced 2026-04-21 14:17:16 +00:00
fix(source-control): do not reset defaultBaseRef on worktree switch (#811)
The defaultBaseRef resolver is repo-scoped, not worktree-scoped. Resetting it to 'origin/main' on every worktree switch within the same repo clobbered the correct value (e.g. 'origin/master'), causing persistent 'Branch compare unavailable' errors.
This commit is contained in:
parent
eacdc2b946
commit
ffcc144a75
1 changed files with 7 additions and 1 deletions
|
|
@ -274,7 +274,13 @@ function SourceControlInner(): React.JSX.Element {
|
|||
setScope('all')
|
||||
setCollapsedSections(new Set())
|
||||
setBaseRefDialogOpen(false)
|
||||
setDefaultBaseRef('origin/main')
|
||||
// Why: do NOT reset defaultBaseRef here. It is repo-scoped, not
|
||||
// worktree-scoped, and is resolved by the effect above on activeRepo
|
||||
// change. Resetting it to a hard-coded 'origin/main' on every worktree
|
||||
// switch within the same repo clobbered the correct value (e.g.
|
||||
// 'origin/master' for repos whose default branch isn't main), causing
|
||||
// a persistent "Branch compare unavailable" until the user switched
|
||||
// repos and back to re-trigger the resolver.
|
||||
setFilterQuery('')
|
||||
setIsExecutingBulk(false)
|
||||
}, [activeWorktreeId])
|
||||
|
|
|
|||
Loading…
Reference in a new issue