Skip to content

feat(vcs): publish branch updates - #40371

Merged
rekram1-node merged 4 commits into
v2from
vcs-branch-watch
Aug 4, 2026
Merged

feat(vcs): publish branch updates#40371
rekram1-node merged 4 commits into
v2from
vcs-branch-watch

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep branch metadata as one plain in-memory value per location-scoped VCS service
  • initialize it once, then update it in the background from existing filesystem.changed bus events
  • watch Git HEAD and Mercurial .hg/branch through the existing LocationWatcher
  • publish vcs.branch.updated only when the current branch changes

vcs.info() only returns the current in-memory value; it does not execute Git or Mercurial after initialization. The scoped bus subscriber replaces that value with a freshly read Info object whenever branch metadata changes.

For an unborn Git repository, the current initial branch is used as the default until normal default-branch discovery becomes available.

Verification

  • bun typecheck in packages/core
  • bun test test/vcs.test.ts in packages/core (7 passed)
  • bun test test/filesystem/watcher.test.ts in packages/core (13 passed)
  • bun test test/vcs-hg.test.ts with an isolated Mercurial 7.2.3 installation (6 passed)
  • targeted oxlint and Effect pattern checks report no new violations

@rekram1-node
rekram1-node merged commit 9bd99b4 into v2 Aug 4, 2026
8 checks passed
@rekram1-node
rekram1-node deleted the vcs-branch-watch branch August 4, 2026 16:52
github-actions Bot pushed a commit to ReStranger/opencode that referenced this pull request Aug 5, 2026
* upstream/v2: (28 commits)
  refactor(app): gate unsupported v2 capabilities (anomalyco#40381)
  fix(app): show active search details (anomalyco#40597)
  refactor(app): migrate supported v2 APIs (anomalyco#40378)
  fix(app): reconcile v2 session projections (anomalyco#40376)
  refactor(app): own rendering contracts (anomalyco#40375)
  fix(core): make xAI OAuth device-only (anomalyco#40538)
  test(app): migrate e2e fixtures to v2 (anomalyco#40374)
  fix(core): report missing shell workdir (anomalyco#40542)
  fix(ai): restore Responses tool input semantics (anomalyco#40553)
  fix(ai): classify malformed Responses tool calls (anomalyco#40549)
  feat(tui): streamline tab navigation shortcuts (anomalyco#40551)
  fix(ai): preserve Gemini tool finish semantics (anomalyco#40546)
  fix: retry empty incomplete streams (anomalyco#40535)
  fix(app): finish tool call ID rename (anomalyco#40539)
  refactor: rename tool call ID fields
  fix(client): wait for live service contenders (anomalyco#40515)
  chore(core): drop unreachable AI SDK provider packages (anomalyco#40504)
  fix(tui): update tab titles immediately (anomalyco#40318)
  fix(tui): show branch beside directory (anomalyco#40500)
  feat(vcs): publish branch updates (anomalyco#40371)
  ...
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