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

Function writeListRefsRequest

src/wire/writeListRefsRequest.js:11–26  ·  view source on GitHub ↗
({ prefix, symrefs, peelTags })

Source from the content-addressed store, hash-verified

9 * @returns {Uint8Array[]}
10 */
11export async function writeListRefsRequest({ prefix, symrefs, peelTags }) {
12 const packstream = []
13 // command
14 packstream.push(GitPktLine.encode('command=ls-refs\n'))
15 // capability-list
16 packstream.push(GitPktLine.encode(`agent=${pkg.agent}\n`))
17 // [command-args]
18 if (peelTags || symrefs || prefix) {
19 packstream.push(GitPktLine.delim())
20 }
21 if (peelTags) packstream.push(GitPktLine.encode('peel'))
22 if (symrefs) packstream.push(GitPktLine.encode('symrefs'))
23 if (prefix) packstream.push(GitPktLine.encode(`ref-prefix ${prefix}`))
24 packstream.push(GitPktLine.flush())
25 return packstream
26}

Callers 1

listServerRefsFunction · 0.90

Calls 3

encodeMethod · 0.80
delimMethod · 0.80
flushMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…