summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-08-11 21:59:12 -0400
committerDax Raad <[email protected]>2025-08-11 21:59:12 -0400
commit7d095d19f6c52220987f0c674db6e0d26a77d174 (patch)
treec85e7a7e3c1f5d7e4bd3c008a53321aeb8b74b69
parent0ca10ec2f5b2fd69eedaf58f7971438f02452142 (diff)
downloadopencode-7d095d19f6c52220987f0c674db6e0d26a77d174.tar.gz
opencode-7d095d19f6c52220987f0c674db6e0d26a77d174.zip
fix undo/redo when opencode is run in nested folders
-rw-r--r--packages/opencode/src/snapshot/index.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/opencode/src/snapshot/index.ts b/packages/opencode/src/snapshot/index.ts
index 163fec37c..d69fb69d9 100644
--- a/packages/opencode/src/snapshot/index.ts
+++ b/packages/opencode/src/snapshot/index.ts
@@ -43,7 +43,7 @@ export namespace Snapshot {
}
await $`git --git-dir ${git} add .`.quiet().cwd(app.path.cwd).nothrow()
const hash = await $`git --git-dir ${git} write-tree`.quiet().cwd(app.path.cwd).nothrow().text()
- log.info("tracking", { hash })
+ log.info("tracking", { hash, cwd: app.path.cwd, git })
return hash.trim()
}
@@ -65,7 +65,7 @@ export namespace Snapshot {
.split("\n")
.map((x) => x.trim())
.filter(Boolean)
- .map((x) => path.join(app.path.cwd, x)),
+ .map((x) => path.join(app.path.root, x)),
}
}