Function
filterChangesetsSinceRef
(
changesets: Array<string>,
changesetBase: string,
sinceRef: string
)
Source from the content-addressed store, hash-verified
| 6 | import getOldChangesetsAndWarn from "./legacy"; |
| 7 | |
| 8 | async function filterChangesetsSinceRef( |
| 9 | changesets: Array<string>, |
| 10 | changesetBase: string, |
| 11 | sinceRef: string |
| 12 | ) { |
| 13 | const newChangesets = await git.getChangedChangesetFilesSinceRef({ |
| 14 | cwd: changesetBase, |
| 15 | ref: sinceRef, |
| 16 | }); |
| 17 | const newHashes = newChangesets.map((c) => c.split("/").pop()); |
| 18 | |
| 19 | return changesets.filter((dir) => newHashes.includes(dir)); |
| 20 | } |
| 21 | |
| 22 | export default async function getChangesets( |
| 23 | rootDir: string, |
Tested by
no test coverage detected