Original: The Confederates had succeeded in holding the rail breastworks, yet had expended most of their ammunition in doing so.
Simplified: The confederate rail breastworks had held, but the holding of the line had resulted in the use of a huge amount of ammunition.