Use numeric indices for delta filenames, document limitations
- Delta files now named 0.zst, 1.zst etc — avoids path length issues and ambiguous separator substitution; manifest maps index to path - PLAN.md: document delta naming rationale - PLAN.md: document cross-file deduplication limitation and possible future approaches (zstd dictionary training, content-addressing, tar stream)
This commit is contained in:
@@ -65,16 +65,16 @@ export async function runCommand(config) {
|
||||
}
|
||||
|
||||
const manifestChanges = [];
|
||||
let fileIndex = 0;
|
||||
|
||||
for (const change of changes) {
|
||||
const deltaFilename = change.path.replaceAll('/', '__') + backend.ext;
|
||||
const outFile = join(filesDir, deltaFilename);
|
||||
|
||||
if (change.status === 'deleted') {
|
||||
manifestChanges.push({ path: change.path, status: 'deleted' });
|
||||
continue;
|
||||
}
|
||||
|
||||
const deltaFilename = `${fileIndex}${backend.ext}`;
|
||||
const outFile = join(filesDir, deltaFilename);
|
||||
const prevFile = join(prev, change.path);
|
||||
const newFile = join(pend, change.path);
|
||||
|
||||
@@ -97,6 +97,8 @@ export async function runCommand(config) {
|
||||
status: change.status,
|
||||
delta: join('files', deltaFilename),
|
||||
});
|
||||
|
||||
fileIndex++;
|
||||
}
|
||||
|
||||
// ── Phase 5: Write manifest + atomic commit ──────────────────
|
||||
|
||||
Reference in New Issue
Block a user