pass input branch through to output source

git rev-parse --abbrev-ref HEAD only works when not on a detached head. if you
are, it just says "HEAD".