After a dormant Giants offense scored just six runs in its last six games — each a loss — the Giants’ bats woke up and the team avoided what would’ve been its first winless six-game homestand at AT&T Park with a 7-5 comeback victory against the Pirates on Wednesday afternoon.