(opts: PushWithDeps)
| 235 | } |
| 236 | |
| 237 | export async function pushWith(opts: PushWithDeps): Promise<PushResult> { |
| 238 | const dir = opts.dir ?? "/"; |
| 239 | try { |
| 240 | return await opts.git.push({ |
| 241 | fs: opts.fs, |
| 242 | http: opts.http, |
| 243 | dir, |
| 244 | url: opts.url, |
| 245 | remote: opts.remote, |
| 246 | ref: opts.ref, |
| 247 | remoteRef: opts.remoteRef, |
| 248 | force: opts.force, |
| 249 | delete: opts.delete, |
| 250 | headers: opts.headers, |
| 251 | onAuth: opts.onAuth, |
| 252 | onProgress: opts.onProgress, |
| 253 | onMessage: opts.onMessage, |
| 254 | cache: opts.cache, |
| 255 | }); |
| 256 | } catch (cause) { |
| 257 | if (isNotARepositoryCause(cause)) throw new NotARepositoryError(dir, { cause }); |
| 258 | throw new GitError("EPUSHFAIL", `git push failed: ${errorMessage(cause)}`, { cause }); |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | // --------------------------------------------------------------- |
| 263 | // pull |
no test coverage detected