| 239 | }); |
| 240 | |
| 241 | async function commitFile(cwd: string, file: string, message: string, content = file) { |
| 242 | const fullPath = path.join(cwd, file); |
| 243 | await fs.mkdir(path.dirname(fullPath), { recursive: true }); |
| 244 | await fs.writeFile(fullPath, content); |
| 245 | await x("git", ["add", "--", file], { nodeOptions: { cwd } }); |
| 246 | await x("git", ["commit", "-m", message], { nodeOptions: { cwd } }); |
| 247 | } |
| 248 | |
| 249 | test("filters history commits by a single path", async () => { |
| 250 | const cwd: string = await git.bootstrap(); |