(opts: LsFilesWithDeps)
| 363 | } |
| 364 | |
| 365 | export async function lsFilesWith(opts: LsFilesWithDeps): Promise<string[]> { |
| 366 | const dir = opts.dir ?? "/"; |
| 367 | try { |
| 368 | return await opts.git.listFiles({ |
| 369 | fs: opts.fs, |
| 370 | dir, |
| 371 | ref: opts.ref, |
| 372 | cache: opts.cache, |
| 373 | }); |
| 374 | } catch (cause) { |
| 375 | if (isNotARepositoryCause(cause)) throw new NotARepositoryError(dir, { cause }); |
| 376 | throw new GitError("ELSFILESFAIL", `git ls-files failed: ${errorMessage(cause)}`, { |
| 377 | cause, |
| 378 | }); |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | // --------------------------------------------------------------- |
| 383 | // ls-tree |
no test coverage detected