mirror of
https://github.com/samsonjs/spirit-tracker.git
synced 2026-03-25 09:25:51 +00:00
fix: Recent generation
This commit is contained in:
parent
023128812d
commit
e14a6d1ef0
1 changed files with 8 additions and 0 deletions
|
|
@ -336,6 +336,13 @@ function main() {
|
||||||
nextObj = gitShowJson(toSha, file);
|
nextObj = gitShowJson(toSha, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NEW: if the DB file itself doesn't exist at "to", skip (prevents mass "removed")
|
||||||
|
const nextExists =
|
||||||
|
toSha === "WORKTREE"
|
||||||
|
? fs.existsSync(path.join(repoRoot, file))
|
||||||
|
: gitFileExistsAtSha(toSha, file);
|
||||||
|
if (!nextExists) continue;
|
||||||
|
|
||||||
if (!prevObj && !nextObj) continue;
|
if (!prevObj && !nextObj) continue;
|
||||||
|
|
||||||
const storeLabel = String(nextObj?.storeLabel || nextObj?.store || prevObj?.storeLabel || prevObj?.store || "");
|
const storeLabel = String(nextObj?.storeLabel || nextObj?.store || prevObj?.storeLabel || prevObj?.store || "");
|
||||||
|
|
@ -426,6 +433,7 @@ function main() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
items.sort((a, b) => String(b.ts).localeCompare(String(a.ts)));
|
items.sort((a, b) => String(b.ts).localeCompare(String(a.ts)));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue