Petit set down the first eight Colorado hitters he faced Thursday, setting the record by striking out Charlie Culberson and drawing a standing ovation at AT&T Park. That broke the mark held by Mark Buehrle with 45 in a row for the Chicago White Sox in 2009.
Petit's string covered eight games, six of them in relief.
The 29-year-old journeyman from Venezuela fell one out shy of a perfect game against Arizona last September. Petit made this start in place of struggling Tim Lincecum, who was recently sent to the bullpen.