fix(i18n): pin translation snapshots against gc

This commit is contained in:
ZiyaZhang
2026-07-28 10:28:49 -07:00
parent e59e2f6192
commit 612b527cd2
8 changed files with 38 additions and 21 deletions

View File

@@ -45,6 +45,10 @@ describe('translation pairing snapshots', () => {
const objectId = storeGitBlob(root, content)
expect(objectId).toBe(gitBlobHash(content))
expect(execFileSync('git', [
'-C', root, 'rev-parse', `refs/dsh/translation-pairing/snapshots/${objectId}`,
], { encoding: 'utf8' }).trim()).toBe(objectId)
execFileSync('git', ['-C', root, 'gc', '--prune=now'])
expect(execFileSync('git', ['-C', root, 'cat-file', '-p', objectId])).toEqual(content)
} finally {
rmSync(root, { recursive: true, force: true })