fix branch detection to not choke on https urls