MCPcopy Create free account
hub / github.com/isomorphic-git/isomorphic-git / listBranches

Function listBranches

src/api/listBranches.js:37–58  ·  view source on GitHub ↗
({
  fs,
  dir,
  gitdir = join(dir, '.git'),
  remote,
})

Source from the content-addressed store, hash-verified

35 *
36 */
37export 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}

Calls 4

joinFunction · 0.90
assertParameterFunction · 0.90
discoverGitdirFunction · 0.90
listBranchesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…