MCPcopy Create free account
hub / github.com/brimdata/super / HEAD

Method HEAD

cli/poolflags/flags.go:19–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17}
18
19func (f *Flags) HEAD() (*dbid.Commitish, error) {
20 if f.defaultHead == "" {
21 return nil, errors.New(`pool and branch are unspecified
22(specify with -use flag or "super db use" command)`)
23 }
24 c, err := dbid.ParseCommitish(f.defaultHead)
25 if err != nil {
26 return nil, err
27 }
28 if c.Pool == "" {
29 return nil, errors.New("pool unspecified")
30 }
31 if c.Branch == "" {
32 c.Branch = "main"
33 }
34 return c, nil
35}

Callers 14

RunMethod · 0.80
RunMethod · 0.80
RunMethod · 0.80
RunMethod · 0.80
RunMethod · 0.80
RunMethod · 0.80
RunMethod · 0.80
RunMethod · 0.80
RunMethod · 0.80
RunMethod · 0.80
RunMethod · 0.80
listMethod · 0.80

Calls 2

ParseCommitishFunction · 0.92
NewMethod · 0.80

Tested by

no test coverage detected