Skip to content

Commit

Permalink
CBG-4277: Remove unused totalBytesForHistory from getHistory (#7137)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregns1 authored and bbrks committed Sep 26, 2024
1 parent 2583f2b commit f35e421
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions db/revtree.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,15 +724,12 @@ func (tree RevTree) RenderGraphvizDot() string {
func (tree RevTree) getHistory(revid string) ([]string, error) {
maxHistory := len(tree)

var totalBytesForHistory int
history := make([]string, 0, 5)
for revid != "" {
info, err := tree.getInfo(revid)
if err != nil {
break
}
revBytes := len([]byte(revid))
totalBytesForHistory += revBytes
history = append(history, revid)
if len(history) > maxHistory {
return history, fmt.Errorf("getHistory found cycle in revision tree, history calculated as: %v", history)
Expand Down

0 comments on commit f35e421

Please sign in to comment.