Log restoreCheckpoint duration

This commit is contained in:
cte 2025-02-11 11:24:33 -08:00
parent d9ac8efb1f
commit 94cb09f6cd

View file

@ -354,9 +354,12 @@ export class CheckpointService {
}
public async restoreCheckpoint(commitHash: string) {
const startTime = Date.now()
await this.ensureBranch(this.mainBranch)
await this.git.clean([CleanOptions.FORCE, CleanOptions.RECURSIVE])
await this.git.raw(["restore", "--source", commitHash, "--worktree", "--", "."])
const duration = Date.now() - startTime
this.log(`[restoreCheckpoint] restored checkpoint ${commitHash} in ${duration}ms`)
this.currentCheckpoint = commitHash
}