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

Method Compile

entity/dag/example_test.go:274–285  ·  view source on GitHub ↗

Compile compute a view of the final state. This is what we would use to display the state in a user interface.

()

Source from the content-addressed store, hash-verified

272// Compile compute a view of the final state. This is what we would use to display the state
273// in a user interface.
274func (pc ProjectConfig) Compile() *Snapshot {
275 // Note: this would benefit from caching, but it's a simple example
276 snap := &Snapshot{
277 // default value
278 Administrator: make(map[identity.Interface]struct{}),
279 SignatureRequired: false,
280 }
281 for _, op := range pc.Operations() {
282 op.(Operation).Apply(snap)
283 }
284 return snap
285}
286
287// Read is a helper to load a ProjectConfig from a Repository
288func Read(repo repository.ClockedRepo, id entity.Id) (*ProjectConfig, error) {

Callers

nothing calls this directly

Calls 2

OperationsMethod · 0.65
ApplyMethod · 0.65

Tested by

no test coverage detected