wip: snapshot

This commit is contained in:
Dax Raad
2025-07-28 13:00:09 -04:00
parent 99dfe65862
commit c24fbb4292
3 changed files with 25 additions and 1 deletions

View File

@@ -94,6 +94,13 @@ export namespace Snapshot {
}
}
export async function diff(hash: string) {
const app = App.info()
const git = gitdir()
const result = await $`git --git-dir=${git} diff ${hash} -- .`.quiet().cwd(app.path.root).text()
return result.trim()
}
function gitdir() {
const app = App.info()
return path.join(app.path.data, "snapshots")