The Giants scratched third baseman Evan Longoria after a flare-up of a lingering ankle injury.