Parse LFS Pointers Quickly

sow-tools no longer relies on git lfs ls-files --json for planning. It
now parses the checked-out LFS pointer files directly, so split sizing
and content_hash use the real LFS oid and size.
This commit is contained in:
2026-04-14 11:40:38 +02:00
parent bf7c844f2e
commit 9dbb533241
2 changed files with 150 additions and 10 deletions
+10 -1
View File
@@ -1831,7 +1831,7 @@ func TestPlanHAKChunksPutsNewestAssetsInLastChunk(t *testing.T) {
t.Fatalf("scan: %v", err)
}
assets, err := collectAssetResources(p)
assets, err := collectAssetResources(p, false)
if err != nil {
t.Fatalf("collect asset resources: %v", err)
}
@@ -2109,6 +2109,12 @@ func TestCompareFailsWhenBuildIsStale(t *testing.T) {
if _, err := BuildModule(p); err != nil {
t.Fatalf("build module: %v", err)
}
modulePath := filepath.Join(root, "build", "testmod.mod")
moduleInfo, err := os.Stat(modulePath)
if err != nil {
t.Fatalf("stat built module: %v", err)
}
staleSourceTime := moduleInfo.ModTime().Add(2 * time.Second)
mustWriteFile(t, filepath.Join(root, "src", "module", "module.ifo.json"), `{
"file_type": "IFO ",
"file_version": "V3.2",
@@ -2124,6 +2130,9 @@ func TestCompareFailsWhenBuildIsStale(t *testing.T) {
}
}
`)
if err := os.Chtimes(filepath.Join(root, "src", "module", "module.ifo.json"), staleSourceTime, staleSourceTime); err != nil {
t.Fatalf("chtimes updated source: %v", err)
}
if err := p.Scan(); err != nil {
t.Fatalf("rescan: %v", err)
}