I work in buildings with galvanized piping OVER 80 years old still going strong.
When a water main does give up the ghost you are norally better off replacing the entire main BUT
before you replace it find out the soil conditions and Ph of the water so you do not install a new pipe to have it corrode in a few years.
For under ground service I never use anything but Type K copper.
If you plan on selling this building in the near future just make a repair.