A man attacked his ex in the street after breaking a court order not to contact her, Lincoln Crown Court was told.
Liam Greaves approached his former partner Lauren Shaw as she walked on Moorland Avenue in Lincoln on her way to see her mother.
Sam Skinner, prosecuting, told the court: “She first became aware of the defendant when a glass bottle flew past her and smashed in the ground.
“The defendant told her to watch and then threw another glass bottle which hit her arm causing bruising.”
Ms Shaw reached her mother’s house and was explaining what had happened when she heard the sound of glass breaking as bottles were lobbed against the wall of the property.
Police were called but Greaves had left the scene by the time officers arrived. He was arrested later but when he was interviewed he denied any involvement.
The court heard that at the time of the incident Greaves was the subject of a restraining order banning him from contacting Lauren Shaw.
Greaves, 20, of Constable Avenue, Lincoln, admitted charges of assault occasioning actual bodily harm and breach of a restraining order arising from the incident on September 17, 2016. He was sent to a young offenders’ institution for eight months.
David Eager, in mitigation, said: “His immaturity and his reaction was entirely wrong.
“Relationships are complicated things. This was not a one-sided fascination by him. She was party to that as well.”
He urged the judge to impose a suspended sentence and said that Lauren Shaw has since applied to have the restraining order lifted although no decision has yet been made about that.
Judge Simon Hirst, passing sentence, told Greaves: “I am urged to pull back from an immediate custodial sentence but I am not able to do that.
“You have had opportunity after opportunity. You have flouted an order of the court. In my judgement only an immediate custodial sentence will do.”