Remove white space from git branch details

this allows a response of 'HEAD (no branch)' to be correctly processed.