Galvanised cables are in the same league as "rustless" spokes - AVOID.
as with many things they are not all the same. For example modern 'rustless spokes' are electroplated with the least amount of plating possible and will last oooh, about a year or two before they rust. By contrast rustless spokes as they were made at one time were hot dipped (I think); at least they had much thicker coating on them and would last maybe a decade before there was any real danger of rust.
BTW stainless steel inners are not immune from corrosion; if an outer fills up with water and stays filled up with water (eg on a bike with a long cable housing run for an IGH or a brake, with a slopey cable run down the chainstay) then the conditions inside the cable can rapidly become anaerobic, which means that the protective oxide film on the stainless steel cannot re-form.
I have seen many stainless inners emerge from such housing runs and they are usually black-coloured at the low spot. The blackness is a sign of corrosion; often the black coloured part of the cable will break if flexed a few times and if it is really bad then the cable inner will break inside the housing and if it comes out at all, it will come out in two pieces.
I don't think that this happens very quickly, nor is it very likely on many bikes because of the way the cable runs are arranged, but even so the main protection from this (which applies whether the cable is stainless or galvanised) is stopping the water from getting in and/or lubricating the cable properly. BTW there are ferrules with external boots and seals that prevent upwards-facing housing ends from filling up with crud; you need to use these if you want your cabling to last in the weather.
BTW a straw poll of cables that are being replaced with new in an LBS near me produced an interesting result; the #1 cause of a cable going bad appears to be that it was never installed correctly; installed without decent lube, without the correct ferrules, with badly prepped housing ends, with poor cable runs that allow water in too easily. In many cases if the original cable was reinstalled with these faults corrected, it would carry on working.
A final point is that wherever a cable flexes, the strands in the cable will rub against one another. This rubbing can hasten a cable failure; when industrial wire ropes are installed they are impregnated with heavy grease to help prevent such rubbing damage. Thus installing cables bone-dry inside shifters is asking for trouble, and coated cables cannot easily be lubricated (within the strand bundle) whilst the coating is intact.
cheers