Browse Source

fix: vcs watcher if statement (#17673)

Aiden Cline 7 months ago
parent
commit
510374207d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/opencode/src/project/vcs.ts

+ 1 - 1
packages/opencode/src/project/vcs.ts

@@ -47,7 +47,7 @@ export namespace Vcs {
       log.info("initialized", { branch: current })
       log.info("initialized", { branch: current })
 
 
       const unsubscribe = Bus.subscribe(FileWatcher.Event.Updated, async (evt) => {
       const unsubscribe = Bus.subscribe(FileWatcher.Event.Updated, async (evt) => {
-        if (evt.properties.file.endsWith("HEAD")) return
+        if (!evt.properties.file.endsWith("HEAD")) return
         const next = await currentBranch()
         const next = await currentBranch()
         if (next !== current) {
         if (next !== current) {
           log.info("branch changed", { from: current, to: next })
           log.info("branch changed", { from: current, to: next })