MCPcopy Create free account
hub / github.com/arctic-cli/interface / currentBranch

Function currentBranch

packages/arctic/src/project/vcs.ts:31–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29 export type Info = z.infer<typeof Info>
30
31 async function currentBranch() {
32 return $`git rev-parse --abbrev-ref HEAD`
33 .quiet()
34 .nothrow()
35 .cwd(Instance.worktree)
36 .text()
37 .then((x) => x.trim())
38 .catch(() => undefined)
39 }
40
41 const state = Instance.state(
42 async () => {

Callers 1

vcs.tsFile · 0.85

Calls 4

quietMethod · 0.80
textMethod · 0.65
cwdMethod · 0.65
nothrowMethod · 0.65

Tested by

no test coverage detected