(opts: FetchWithDeps)
| 182 | } |
| 183 | |
| 184 | export async function fetchWith(opts: FetchWithDeps): Promise<FetchResult> { |
| 185 | const dir = opts.dir ?? "/"; |
| 186 | try { |
| 187 | return await opts.git.fetch({ |
| 188 | fs: opts.fs, |
| 189 | http: opts.http, |
| 190 | dir, |
| 191 | url: opts.url, |
| 192 | remote: opts.remote, |
| 193 | ref: opts.ref, |
| 194 | remoteRef: opts.remoteRef, |
| 195 | depth: opts.depth, |
| 196 | singleBranch: opts.singleBranch, |
| 197 | tags: opts.tags, |
| 198 | prune: opts.prune, |
| 199 | headers: opts.headers, |
| 200 | onAuth: opts.onAuth, |
| 201 | onProgress: opts.onProgress, |
| 202 | onMessage: opts.onMessage, |
| 203 | cache: opts.cache, |
| 204 | }); |
| 205 | } catch (cause) { |
| 206 | if (isNotARepositoryCause(cause)) throw new NotARepositoryError(dir, { cause }); |
| 207 | throw new GitError("EFETCHFAIL", `git fetch failed: ${errorMessage(cause)}`, { cause }); |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | // --------------------------------------------------------------- |
| 212 | // push |
no test coverage detected