Skip to content

Fix main: restore getGitCommonDir import and pass a GitRepo to refreshRemoteBranches - #7132

Merged
ymichael merged 1 commit into
mainfrom
bb/fix-branch-options-getgitcommondir
Nov 5, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/fix-branch-options-getgitcommondir

Conversation

@ymichael

@ymichael ymichael commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

What was wrong

Main is red at 87a6e85. #7074 (b9ea287) and #7100 (87a6e85) merged minutes apart, and each passed CI on its own base:

On main this gives:

  • Lint and typecheck: src/branch-options.ts(191,27): error TS2304: Cannot find name 'getGitCommonDir'.
  • ReferenceError: getGitCommonDir is not defined in packages-other, packages-host, plugins-2 and integration (Linux and Windows).

Once the import is back, the Git plugin's fetches remote branches when asked, never on a branch read test still fails. The plugin passes a path string where refreshRemoteBranches now reads repo.commonDir, so no fetch ever starts. Opening a merge-base picker would not fetch remotes.

Change

Verification

Against origin/main 87a6e85 plus this change:

  • turbo run typecheck for bb-environment-provider-host, bb-plugin-bb--git and @bb/host-daemon passes.
  • bb-environment-provider-host tests: 48/48 pass, including branch-options-cache.test.ts, which failed on main.
  • bb-plugin-bb--git tests: 278/278 pass. host.test.ts > fetches remote branches when asked fails on main and fails with the import fix alone. It passes with this change, and also passed at b9ea287.
  • @bb/host-daemon test/command/host-branches-dispatch.test.ts: 21/21 pass. Several failed on main.
  • tests/integration fake/smoke/environment-actions.test.ts: 5/5 pass. It failed on main.

AGENT GENERATED

🤖 Generated with Claude Code

…hRemoteBranches

#7074 and #7100 merged minutes apart and each passed CI alone.
#7074 added getGitCommonDir calls in branch-options.ts and a
fetchRemoteBranches RPC in the Git plugin that passes a path to
refreshRemoteBranches. #7100 dropped the getGitCommonDir import and
changed refreshRemoteBranches to take a GitRepo.

Restore the import, and have the Git plugin resolve the repo with
readGitRepo first, skipping non-repos, as the daemon caller does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ymichael
ymichael merged commit 8647d51 into main Nov 5, 2026
48 checks passed
@ymichael
ymichael deleted the bb/fix-branch-options-getgitcommondir branch November 5, 2026 18:10
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