()
| 25 | const resetClient = git as unknown as IsomorphicGitResetClient; |
| 26 | |
| 27 | async function init() { |
| 28 | await memfs.promises.mkdir(DIR, { recursive: true }); |
| 29 | await git.init({ fs: memfs, dir: DIR, defaultBranch: "main" }); |
| 30 | // stash creates a commit internally, so it needs an identity. |
| 31 | await git.setConfig({ fs: memfs, dir: DIR, path: "user.name", value: AUTHOR.name }); |
| 32 | await git.setConfig({ fs: memfs, dir: DIR, path: "user.email", value: AUTHOR.email }); |
| 33 | } |
| 34 | |
| 35 | async function commit(name: string, content: string, message: string): Promise<string> { |
| 36 | await memfs.promises.writeFile(`${DIR}/${name}`, content); |
no test coverage detected