From 0c5d85a8004ce5694245a783590659f363b038fc Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Fri, 2 Feb 2024 17:32:10 +0100 Subject: [PATCH] bench history: replace existing history values --- cmd/history/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/history/main.go b/cmd/history/main.go index e7b30d0..09d6fd9 100644 --- a/cmd/history/main.go +++ b/cmd/history/main.go @@ -120,9 +120,10 @@ func run(ctx context.Context, args []string, stdout, stderr io.Writer) error { // let merge all and res APPEND: for _, in := range res { - for _, a := range all { + for i, a := range all { if in.Hash == a.Hash { - // the commit already exists in all + // the commit already exists in all we replace the values. + all[i] = in continue APPEND } }