From ab433339646f484c6a609c92d0a8e5a80b94bb59 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Mon, 10 Nov 2014 13:58:29 +1100 Subject: [PATCH] x/tools/dashboard/app: respect gohash in Commit.AddResult This should fix the issue where results sub-repo results are clobbered by subsequent commits. (Much like the previous fix, which only fixed the issue for main repo commits.) TBR=bradfitz R=bradfitz CC=golang-codereviews https://golang.org/cl/167440044 --- dashboard/app/build/build.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard/app/build/build.go b/dashboard/app/build/build.go index 1a5bb49515..90ca344bd8 100644 --- a/dashboard/app/build/build.go +++ b/dashboard/app/build/build.go @@ -154,7 +154,7 @@ func (com *Commit) AddResult(c appengine.Context, r *Result) error { var resultExists bool for i, s := range com.ResultData { // if there already exists result data for this builder at com, overwrite it. - if strings.HasPrefix(s, r.Builder+"|") { + if strings.HasPrefix(s, r.Builder+"|") && strings.HasSuffix(s, "|"+r.GoHash) { resultExists = true com.ResultData[i] = r.Data() }