Actually, the orthodox view is that he cut off his hair with a sword when he went forth and it settled itself into ringlets which never grew back and hence he never needed to shave again; this according to the Nidanakatha of the Jataka commentary:
Next he thought, "These locks of mine are not suited to a monk; but there is no one fit to cut the hair of a Future Buddha. Therefore I will cut them off myself with my sword." And grasping a simitar with his right hand, he seized his top-knot with his left hand, and cut it off, together with the diadem. His hair thus became two finger-breadths in length, and curling to the right, lay close to his head. As long as he lived it remained of that length, and the beard was proportionate. And never again did he have to cut either hair or beard.