This seems to put URLs ending with '.git' in an unfair advantage: they are always deemed valid, while for the rest we explicitly inquire the server.