fix for remote refs not containing a hash; conforms with RCF6901