Fix selecting branch containing multiple dots
We were only handling branch name containing one dot, with this
commit we're supporting branch names containing multiple dots.
Fixes https://pagure.io/pagure/issue/3071
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr></pingou@pingoured.fr>