Fixes T11938.
Note that there's a subcase here: if you hg clone or svn checkout a short /source/ URI that ends in .git, we miss the lookup and don't get this far, so you still get a generic error message.
Hopefully it is clear enough on its own that proto://.../blah.git is, in fact, a Git repository, since it says ".git" at the end.
If that doesn't prove to be true, we can be more surgical about this.