MCPcopy Index your code
hub / github.com/git-bug/git-bug / runBugSelect

Function runBugSelect

commands/bug/bug_select.go:45–65  ·  view source on GitHub ↗
(env *execenv.Env, args []string)

Source from the content-addressed store, hash-verified

43}
44
45func runBugSelect(env *execenv.Env, args []string) error {
46 if len(args) == 0 {
47 return errors.New("a bug id must be provided")
48 }
49
50 prefix := args[0]
51
52 b, err := env.Backend.Bugs().ResolvePrefix(prefix)
53 if err != nil {
54 return err
55 }
56
57 err = _select.Select(env.Backend, bug.Namespace, b.Id())
58 if err != nil {
59 return err
60 }
61
62 env.Out.Printf("selected bug %s: %s\n", b.Id().Human(), b.Snapshot().Title)
63
64 return nil
65}

Callers 1

newBugSelectCommandFunction · 0.85

Calls 7

BugsMethod · 0.80
SnapshotMethod · 0.80
ResolvePrefixMethod · 0.65
IdMethod · 0.65
PrintfMethod · 0.65
NewMethod · 0.45
HumanMethod · 0.45

Tested by

no test coverage detected