SAN FRANCISCO -- If the Giants reach the postseason, Mike Fontenot, all 5 feet, 8 inches of him, will loom large in Giants lore.

Fontenot's two-out, seventh-inning single broke a scoreless tie and helped generate a much-needed victory for the Giants, who buoyed their October hopes with Wednesday night's 2-1 verdict over the Los Angeles Dodgers.

The Giants' 10th triumph in 14 games left them a half-game behind the respective leaders in their dual pursuit -- San Diego in the National League West and Atlanta in the Wild Card standings.

Bent on stimulating the offense and aware of the challenge posed by Dodgers starter Chad Billingsley, who entered the game with an 0.61 ERA in four starts this season against San Francisco, Giants manager Bruce Bochy employed an unusual lineup. It included Eugenio Velez and Nate Schierholtz at the outfield corners, as well as Fontenot, who gave second baseman Freddy Sanchez a rest.

True to form, Billingsley matched Matt Cain zero for zero through six innings. Billingsley was striving to match teammate Clayton Kershaw, who blanked San Francisco on four hits in Tuesday night's series opener.

"We're in a groove, like a friendly competition, outdueling the other person," Billingsley said. "I knew it would be a tough day after the way Kershaw threw last night."

Cain welcomed the standoff.

"It's always fun when you get in a game that's moving along and it's a battle," he said. "... You know every pitch counts."

The deadlock dissolved in the seventh after Travis Ishikawa batted for Cain and rapped a one-out double to end a personal 0-for-13 skid.

"Don't ask me what pitch it was. I have no idea," Ishikawa said of the 1-0 pitch he hammered. Billingsley's wild pitch moved pinch-runner Emmanuel Burriss to third base, where he remained as Velez hit a comebacker.

Up came Fontenot, who entered the game 4-for-11 off Billingsley. Though he was 0-for-3 to this juncture, that included a first-inning line drive to first base and a fifth-inning fly to the warning track. This time, Fontenot broke his bat, but connected solidly enough to loop Billingsley's 1-1 pitch to short right-center field.

"Went down a warrior," Fontenot said, referring to the shattered bat. "I hit a couple of balls really good tonight, hit them right on the barrel. That one hits the label and broke it so it could fall in."

Fontenot, acquired from the Chicago Cubs on Aug. 11, increased his batting average with runners in scoring position to .386 (17-for-44).

"He's a smart player and gives you good at-bats," Bochy said. "That's what you need when you're trying to give a guy a break. It's nice to have that luxury of putting a guy like Fontenot in there."

The Giants' timing in this inning was impeccable. Ishikawa's hit started the rally that made a winner of Cain (12-10), who was wholly deserving of the decision. The right-hander allowed three hits in seven shutout innings. The Dodgers never mounted a serious threat against Cain, who retired 14 of the final 15 batters he faced.

San Francisco has won 10 of Cain's 12 starts since the All-Star break, including his last three against Los Angeles. He's 6-2 with a 2.71 ERA in the second half.

Cain also achieved a statistical milestone by reaching the 200-inning level for the fourth consecutive year. Only four other pitchers in the Giants' San Francisco era have sustained a streak that long: Juan Marichal (10 years in a row, 1962-71), Gaylord Perry (six, 1966-71), Jim Barr (five, 1973-77) and Jack Sanford (four, 1960-63).

"Invaluable," Bochy said of Cain's durability. "To have a guy like this who's so strong, he's a horse. He's one guy I don't get concerned with as far as pitch count. He's in incredible shape. It's a credit to how hard he works. ... Even in the seventh inning, he had the same stuff he started with."

Aubrey Huff manufactured an eighth-inning run by lining an opposite-field double to left, advancing on a wild pitch and scoring on Pablo Sandoval's groundout. It reflected typical hustle by Huff, who slid hard into home plate and beat second baseman Ryan Theriot's throw. But the ultimate beneficiary could have been Sandoval, who struck out with the bases loaded to end the first inning and fanned again with two on and one out in the sixth.

"Hopefully it does a lot for his confidence," Bochy said. "This kid gives you everything he's got and he takes it hard when good things don't happen for him. He got enough of the ball [but] hit it soft enough. But you have to give Huff credit there. He busted his tail."

Huff's run proved essential, since Brian Wilson surrendered Andre Ethier's two-out homer in the ninth before striking out Jay Gibbons to seal his 43rd save.

"It's going to be this way, probably for the rest of the way," Bochy said. "It'll come down to pitching, defense and hopefully you get a timely hit. We got it tonight."