( git: GitCommandManager, remote: string, branch: string, depth: number )
| 32 | } |
| 33 | |
| 34 | export async function tryFetch( |
| 35 | git: GitCommandManager, |
| 36 | remote: string, |
| 37 | branch: string, |
| 38 | depth: number |
| 39 | ): Promise<boolean> { |
| 40 | try { |
| 41 | await git.fetch([`${branch}:refs/remotes/${remote}/${branch}`], remote, [ |
| 42 | '--force', |
| 43 | `--depth=${depth}` |
| 44 | ]) |
| 45 | return true |
| 46 | } catch { |
| 47 | return false |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | export async function buildBranchCommits( |
| 52 | git: GitCommandManager, |
no test coverage detected