chore: generate
This commit is contained in:
@@ -152,7 +152,7 @@ export namespace Snapshot {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
log.info("file did not exist in snapshot, deleting", { file })
|
log.info("file did not exist in snapshot, deleting", { file })
|
||||||
await fs.unlink(file).catch(() => { })
|
await fs.unlink(file).catch(() => {})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
files.add(file)
|
files.add(file)
|
||||||
@@ -209,16 +209,22 @@ export namespace Snapshot {
|
|||||||
const beforeResult = isBinaryFile
|
const beforeResult = isBinaryFile
|
||||||
? { exitCode: 0, text: () => "", stderr: Buffer.from("") }
|
? { exitCode: 0, text: () => "", stderr: Buffer.from("") }
|
||||||
: await $`git -c core.autocrlf=false --git-dir ${git} --work-tree ${Instance.worktree} show ${from}:${file}`
|
: await $`git -c core.autocrlf=false --git-dir ${git} --work-tree ${Instance.worktree} show ${from}:${file}`
|
||||||
.quiet()
|
.quiet()
|
||||||
.nothrow()
|
.nothrow()
|
||||||
const before = beforeResult.exitCode === 0 ? beforeResult.text() : `[DEBUG ERROR] git show ${from}:${file} failed: ${beforeResult.stderr.toString()}`
|
const before =
|
||||||
|
beforeResult.exitCode === 0
|
||||||
|
? beforeResult.text()
|
||||||
|
: `[DEBUG ERROR] git show ${from}:${file} failed: ${beforeResult.stderr.toString()}`
|
||||||
|
|
||||||
const afterResult = isBinaryFile
|
const afterResult = isBinaryFile
|
||||||
? { exitCode: 0, text: () => "", stderr: Buffer.from("") }
|
? { exitCode: 0, text: () => "", stderr: Buffer.from("") }
|
||||||
: await $`git -c core.autocrlf=false --git-dir ${git} --work-tree ${Instance.worktree} show ${to}:${file}`
|
: await $`git -c core.autocrlf=false --git-dir ${git} --work-tree ${Instance.worktree} show ${to}:${file}`
|
||||||
.quiet()
|
.quiet()
|
||||||
.nothrow()
|
.nothrow()
|
||||||
const after = afterResult.exitCode === 0 ? afterResult.text() : `[DEBUG ERROR] git show ${to}:${file} failed: ${afterResult.stderr.toString()}`
|
const after =
|
||||||
|
afterResult.exitCode === 0
|
||||||
|
? afterResult.text()
|
||||||
|
: `[DEBUG ERROR] git show ${to}:${file} failed: ${afterResult.stderr.toString()}`
|
||||||
const added = isBinaryFile ? 0 : parseInt(additions)
|
const added = isBinaryFile ? 0 : parseInt(additions)
|
||||||
const deleted = isBinaryFile ? 0 : parseInt(deletions)
|
const deleted = isBinaryFile ? 0 : parseInt(deletions)
|
||||||
result.push({
|
result.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user