git-gui: Refactor reponame computation.