A young man who carried out an assault with a glass bottle in a packed Greenock beer garden has been spared a custodial sentence for the offence.