Updated

There was a time Jeff Samardzija and Andrew Cashner sat in the Wrigley Field bullpen together putting in their time as relievers while being considered the potential future front end of what's presently the best team in baseball's rotation.

They've since moved west and face off as starters for the second time in a month Tuesday night in San Francisco as the streaking Giants try to make it eight wins in eight games this season against the San Diego Padres.

Teammates in 2010-11 before Cashner was traded to San Diego, neither ended up seeing it through to the end of the Chicago Cubs' lengthy rebuilding phase. Rather than being a part of the 29-14 Cubs, Samardzija (6-2, 2.66 ERA) finds himself atop the NL West and pitching accordingly, while Cashner (2-3, 4.93) is in the division cellar with similarly appropriate numbers.

Samardzija is eating innings for the Giants like few pitchers in baseball, completing at least 7 2/3 in each of his last four starts. The latest might have been his best, surrendering a run and three hits with eight strikeouts in eight innings of Thursday's 3-1 win in San Diego.

"I feel like it took me just a little bit to get going," Samardzija told MLB's official website. "I was leaving the ball in the middle of the plate. I made a minor adjustment and got a little more extension."

It was the second time in as many tries he's beaten the Padres this season after defeating Cashner on April 27 in San Francisco, improving Samardzija to 5-1 with a 3.14 ERA in six starts and two relief appearances against them.

Melvin Upton Jr. (1 for 9), Alexi Amarista (2 for 12), former Chicago White Sox teammate Alexei Ramirez (4 for 20) and Matt Kemp (2 for 10) have struggled against him, while Jon Jay is 10 for 24.

"He did a good job," Padres manager Andy Green said. "I'm honestly to the point where I'm pretty much done tipping my cap to other pitchers though. We've got to have better at-bats."

Cashner is making his first start since straining his hamstring on May 8. That was two starts after the Giants roughed him up for six runs – three earned – and four hits with four walks in 2 2/3 innings of the 13-9 loss last month.

His two starts since have been a little better, but he's failed to go beyond six innings in any of his seven starts and has given up at least three runs in five of them.

The right-hander is still seeking his first win in San Francisco, going 0-5 with a 7.18 ERA in six starts and four relief appearances there. Buster Posey (11 for 25 with two home runs), Brandon Crawford (6 for 15 with a home run) and Brandon Belt (6 for 16 with a home run and two doubles) have all hit him well, but Hunter Pence is 3 for 20 with seven strikeouts.

The Giants (28-19) opened the series with Monday's 1-0 win as Pence's pinch-hit bloop double in the bottom of the ninth drove in Belt. They've won three straight and 11 of 12. They've also won all seven meetings with San Diego this season and nine straight at home in the series.

The Padres (19-27) have scored 20 runs and batted .154 while dropping six of eight.