Fix auto-detection of repository kind when using <git/repo/>#commit

The is related to #488
Fix #488

It is now possible to add a given branch of a remote repository

    opam repository add genet-dev http://github.com/zoggy/opam-repository.git#genet