({
fs,
dir,
gitdir = join(dir, '.git'),
remote,
})
| 35 | * |
| 36 | */ |
| 37 | export async function listBranches({ |
| 38 | fs, |
| 39 | dir, |
| 40 | gitdir = join(dir, '.git'), |
| 41 | remote, |
| 42 | }) { |
| 43 | try { |
| 44 | assertParameter('fs', fs) |
| 45 | assertParameter('gitdir', gitdir) |
| 46 | |
| 47 | const fsp = new FileSystem(fs) |
| 48 | const updatedGitdir = await discoverGitdir({ fsp, dotgit: gitdir }) |
| 49 | return GitRefManager.listBranches({ |
| 50 | fs: fsp, |
| 51 | gitdir: updatedGitdir, |
| 52 | remote, |
| 53 | }) |
| 54 | } catch (err) { |
| 55 | err.caller = 'git.listBranches' |
| 56 | throw err |
| 57 | } |
| 58 | } |
no test coverage detected
searching dependent graphs…