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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user