Handle git remotes that aren't called origin in _repository_name()
I was seeing error: No such remote 'origin'
in the cmake output.
This commit avoids hardcoding origin
as the upstream URL and instead
uses the git rev-parse @{u}
to get the configured upstream.
As a follow-up, I'm not sure this should be executed by default, but for now this fixes a warning that I'm seeing with various projects.