MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / copy

Method copy

db/revtree.go:482–489  ·  view source on GitHub ↗

Deep-copies a RevTree.

()

Source from the content-addressed store, hash-verified

480
481// Deep-copies a RevTree.
482func (tree RevTree) copy() RevTree {
483 result := RevTree{}
484 for rev, info := range tree {
485 copiedInfo := *info
486 result[rev] = &copiedInfo
487 }
488 return result
489}
490
491// Prune all branches so that they have a maximum depth of maxdepth.
492// There is one exception to that, which is tombstoned (deleted) branches that have been deemed "too old"

Calls

no outgoing calls