complete the logic for ls-remote command