use git rev-parse to get the branch name

and prevent the annoying newline from being injected into the log file.