文件制品
Graft 可以在同一个 commit tree 中跟踪 SQLite snapshot 和普通文件。
data.sqlitesettings.jsonattachments/report.pdfassets/icon.pngText Files
Section titled “Text Files”小型 UTF-8 文本文件可以 inline 存储:
settings.json kind: text_file storage: inlineBinary Files 和 External Payload
Section titled “Binary Files 和 External Payload”二进制文件使用 external payload:
attachments/report.pdf kind: binary_file storage: externalcommit 里保存 pointer object,真实字节保存在 .graft/store/files 和远端
payload store。
Storage Policy
Section titled “Storage Policy”[files]inline_text_threshold = "1 MB"external_paths = ["assets/**", "attachments/**"]附件、导入、导出、生成媒体、模型等目录适合作为 external paths。
Conflicts
Section titled “Conflicts”文件 artifact 当前采用保守的 file-level merge:
graft resolve --ours settings.jsongraft resolve --theirs attachments/report.pdfgraft resolve --manual assets/icon.pngSQLite 数据库可以使用 row-aware merge;文件格式未来可以增加语义 resolver。