MCPcopy
hub / github.com/redspread/spread / Branch

Method Branch

pkg/project/branch.go:10–22  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

8)
9
10func (p *Project) Branch(name string) (map[string]*pb.Document, error) {
11 br, err := p.repo.LookupBranch(name, git.BranchRemote)
12 if err != nil {
13 return nil, fmt.Errorf("unable to locate branch: %v", err)
14 }
15
16 tree, err := br.Peel(git.ObjectTree)
17 if err != nil {
18 return nil, err
19 }
20
21 return p.mapFromTree(tree.(*git.Tree))
22}

Callers 1

globalDeployMethod · 0.80

Calls 1

mapFromTreeMethod · 0.95

Tested by

no test coverage detected