Unrelated to this change, but why does this take refs/heads/foo instead of foo?

I expected the command to take "foo" and prefix that with R_HEADS for me.  Unless I setRemote(true), in which case it would prefix with R_REMOTES.