Implement @cmn's suggestions for `git_remote_dup`.