Cody Ross processed the question and then pondered it. His team’s nine-game road trip had ended on a positive note, the Diamondbacks coming away with a 3-2 victory over the San Francisco Giants to win a series, and Ross was trying to decide how to evaluate it.

“We went 4-5?” he asked. “It doesn’t sound too good, but we played well, especially later.”

It was not an easy trip to sum up, not for a team that has a lot going on. The Diamondbacks are shorthanded, playing without several key players. They have a handful of hitters slumping. Their starters were pretty good. Their relievers weren’t bad — except when they were.

And while the Diamondbacks played close games and had chances to win them all, the flip side is that they played close games and had chances to lose them all.

This much was clear: They played hard and never gave in, and on a long and winding three-city voyage, they kept their heads above water. They’ll open a seven-game home stand Thursday night with a 12-9 record.

“Obviously, we’d like to win them a little easier, but it didn’t go that way and you’ve got to give credit to everyone for not quitting,” veteran Eric Hinske said. “It’s a team effort all the way around and everyone is grinding it out out there and having good at-bats. … Everyone picks each other up here. Whoever’s struggling, doesn’t matter. Get the next guy up and we’ll have each other’s backs and we’ll be fine.”

Oddly, the win kept the Diamondbacks a perfect 6-0 in getaway games. Which means … what, exactly?

“I’m not going to try to figure that out,” manager Kirk Gibson said.

The Diamondbacks won a game started by Giants lefty Madison Bumgarner on Wednesday, a day after winning a Matt Cain start. Both at AT&T Park, both against a team that last season won its second World Series title in three years.

The Giants were not perfect and the Diamondbacks took advantage. Oddly, perhaps the Giants two most egregious miscues were committed by outfielders who allowed Diamondbacks rookie Didi Gregorius to stretch singles into doubles.

It happened in the 11th inning on Tuesday night, when Gregorius took advantage of an apparently lackadaisical Andres Torres in left field. Then it happened in the ninth inning on Wednesday, with Gregorius blooping an apparent single before motoring into second base to the surprise of an unsuspecting Angel Pagan in center field.

When Gregorius scored two batters later on Gerardo Parra’s RBI single — the Giants walked the slumping Cliff Pennington to set up a lefty-lefty matchup for Parra — the Diamondbacks had another late-game lead to hand over to their normally reliable relievers.

With closer J.J. Putz getting a day off, David Hernandez got the ball. And for the third time on this trip, he served up a key home run, this time throwing a breaking ball down and in that Brandon Crawford lifted over the right-field wall.

“It wasn’t a good pitch,” Gibson said. “You don’t want to throw a breaking ball down and in to a left-hander in this park or any park.”