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

Method Compile

entities/bug/bug.go:127–139  ·  view source on GitHub ↗

Compile a bug in an easily usable snapshot

()

Source from the content-addressed store, hash-verified

125
126// Compile a bug in an easily usable snapshot
127func (bug *Bug) Compile() *Snapshot {
128 snap := &Snapshot{
129 id: bug.Id(),
130 Status: common.OpenStatus,
131 }
132
133 for _, op := range bug.Operations() {
134 op.Apply(snap)
135 snap.Operations = append(snap.Operations, op)
136 }
137
138 return snap
139}
140
141// FirstOp lookup for the very first operation of the bug.
142// For a valid Bug, this operation should be a CreateOp

Callers

nothing calls this directly

Calls 3

OperationsMethod · 0.95
IdMethod · 0.65
ApplyMethod · 0.65

Tested by

no test coverage detected