We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 121eb24 commit 2378867Copy full SHA for 2378867
1 file changed
packages/opencode/src/snapshot/index.ts
@@ -9,6 +9,7 @@ export namespace Snapshot {
9
const log = Log.create({ service: "snapshot" })
10
11
export async function create(sessionID: string) {
12
+ return
13
log.info("creating snapshot")
14
const app = App.info()
15
const git = gitdir(sessionID)
@@ -45,10 +46,9 @@ export namespace Snapshot {
45
46
.nothrow()
47
log.info("commit")
48
- // Extract commit hash from output like "[main abc1234] snapshot"
49
const match = result.stdout.toString().match(/\[.+ ([a-f0-9]+)\]/)
50
- if (!match) throw new Error("Failed to extract commit hash")
51
- return match[1]
+ if (!match) return
+ return match![1]
52
}
53
54
export async function restore(sessionID: string, commit: string) {
0 commit comments