Puig takes swing at Hundley, Giants rally past Dodgers 2-1