speculator: Fetch before deciding head is fresh

pull/977/head
Daniel Wagner-Hall 9 years ago
parent a80fcfa83b
commit 740cc66a7c

@ -178,6 +178,10 @@ func (s *server) serveSpec(w http.ResponseWriter, req *http.Request) {
var sha string var sha string
if strings.ToLower(req.URL.Path) == "/spec/head" { if strings.ToLower(req.URL.Path) == "/spec/head" {
if err := gitFetch(s.matrixDocCloneURL); err != nil {
writeError(w, 500, err)
return
}
originHead, err := s.getSHAOf("origin/master") originHead, err := s.getSHAOf("origin/master")
if err != nil { if err != nil {
writeError(w, 500, err) writeError(w, 500, err)

Loading…
Cancel
Save