Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

expose versions field to support pruning #2

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion mutable_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func (tree *MutableTree) LoadVersionForOverwriting(targetVersion int64) (int64,
if err != nil {
return latestVersion, err
}
tree.deleteVersionsFrom(targetVersion+1)
tree.deleteVersionsFrom(targetVersion + 1)
return targetVersion, nil
}

Expand Down Expand Up @@ -501,3 +501,7 @@ func (tree *MutableTree) addOrphans(orphans []*Node) {
tree.orphans[string(node.hash)] = node.version
}
}

func (tree *MutableTree) GetVersions() map[int64]bool {
return tree.versions
}