"The legend
of Gyda describes the unification of Norway as somewhat of a love
story. Gyda was born c. 852 in Hordaland. She was the daughter of Eirik, king of Hordaland, (Eirik af Hordaland), one of the petty kings of pre-united Norway. Gyda was proposed to by Harold Fairhair who was then the king of the petty kingdom of Vestfold.

She answered that she refused to marry Harald "before he was king over all of Norway". Harald was therefore induced to take a vow
not to cut nor comb his hair until he was sole king of Norway. Ten
years later, in 872, Harald was now king of united Norway. He was
justified in trimming his hair; whereupon he exchanged the epithet
"shockhead" or "tanglehair" for the one by which he is usually known. He
sent for Gyda reminding her of the promise she made and they were
married.

Most scholars today regard this story as a truthful representation of the romance stories that were popular at the time Heimskringla was written in the 13th Century."