From f35e4215070599e03c2b04a73f8760fdc2e6861f Mon Sep 17 00:00:00 2001 From: Gregory Newman-Smith <109068393+gregns1@users.noreply.github.com> Date: Thu, 26 Sep 2024 16:43:41 +0100 Subject: [PATCH] CBG-4277: Remove unused totalBytesForHistory from getHistory (#7137) --- db/revtree.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/db/revtree.go b/db/revtree.go index b4f14f3f60..08c2dc11bf 100644 --- a/db/revtree.go +++ b/db/revtree.go @@ -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)