MILWAUKEE >> Casey Schmitt has injected all kinds of energy into this Giants team since being called up earlier this month. Little did we know the importance the pregame infusion of sugar the fun-loving rookie has recently provided into Mitch Haniger’s typically rigid diet.

“I’ve been giving him a little Sour Patch before every game,” Schmitt said, giggling, after the Giants’ 3-1 win over the Brewers on Saturday. “I did it yesterday. I did it again today. And he hit home runs in both games.”

Haniger’s second homer in as many games was the deciding blow in their third straight win over the Brewers, coming the inning after Logan Webb looked mortal for the first time all game, allowing Milwaukee to pull even at 1-1 on the final pitch of his masterful seven-inning performance.

“I get on him for bringing food into the dugout,” said Haniger, who added a pair of singles for his second consecutive three-hit game. “But he gave me Sour Patch Kids yesterday and today, so we’ll keep it going. One’s not going to kill you every once in a while.”

For most of the game, it looked like the one run the Giants mustered off Corbin Burnes in the first inning would hold up the entire way, as Webb showed no signs of the bum back that forced him from his last start. He matched the Milwaukee ace and St. Mary’s alumnus pitch for pitch and kept his shutout bid intact until his 107th and final offering.

Yet, it took Haniger’s 419-foot, two-run shot off the batter’s eye in center field for the Giants (27-25) to secure their 10th win in their past 12 games, securing a series victory in this four-game set that concludes today and guaranteeing they will take a winning record home with them to San Francisco.

In dominant form, Webb blanked the Brewers for 6 2/3 innings. But Milwaukee was able to break through with two outs in the seventh, with shortstop Brice Turang sneaking a triple past first baseman LaMonte Wade Jr. and into the right-field corner and scoring on an almost identical hit by the next batter, Victor Caratini.

Webb’s final pitch led to the Brewers’ first and only run but also ended the inning as Michael Conforto fired from right field to nab Caratini advancing to second.

Although his start was pushed back two days and was closely monitored by the Giants training staff, Webb was in top form Saturday, just as he has been all month. He has completed seven innings in four of his five starts this month, leaving only his last one after the sixth inning out of precaution, and allowed five total runs. His ERA in five May starts is 1.30.

“He didn’t look like a pitcher that even needed a couple of extra days,” manager Gabe Kapler said. “But certainly it looked like it was useful for him. The ball was coming out really well. ... I thought he was exceptional today. He felt like he could put the ball where he wanted to put it today with three different pitches.”

“He threw the ball great,” Haniger said. “To be able to go out there and put a couple runs on the board to get him the win, extremely deserving.”

Fanning 11 Brewers, Webb recorded his second double-digit strikeout game of the season and the fifth of his career, including two on the three times he broke out his favorite four-seam fastball.

As he met with reporters, Webb was in the middle of an answer regarding his little-used four-seamer when pitching coach Andrew Bailey and catching coach Craig Albernaz walked into the room and began to razz him for talking it up.

“What inning was the four-seam punchies?” Webb asked them.

“Oh my God, back to back,” Bailey responded with more than a hint of sarcasm.

“That didn’t happen,” Albernaz interjected.

“They asked me about it!” Webb shot back.

Webb’s effective use of the four-seamer, though, merely signaled the strength of his entire arsenal. He made it through the first eight batters without allowing a base runner, snapping that streak only when a strikeout pitch snuck past Patrick Bailey and allowed Joey Wiemer to take first. Webb didn’t allow a hit until the fourth — and only four over his seven innings.

“Honestly, I had a pretty good feel for all three of my pitches today,” Webb said. “Even the four-seam I threw a couple times I felt like I could put it where I wanted to. I don’t feel like you have many days where it’s like that.”

The Giants have had a lot of those days recently. After Webb’s outing Saturday, Giants pitchers have limited their opponents to four or fewer runs in 13 straight games. Their record in those games is 10-3.

With one game to go on this trip, the Giants have gotten superb performances from their starting pitchers, the best bullpen work in the majors, timely and powerful hitting and impressive play from the collection of rookies they are regularly rolling out. They have won in different ways (perhaps no more stark contrast than Friday’s 15-1 rout and Saturday’s pitcher’s duel) and lost only once since leaving home. Everything, as they say, seems to be clicking.