A drug-addicted man who hit police officer Samantha Barlow over the head with a brick will be set free from prison despite objections from his victim.