remote: avoid need for command substitution
remote: use show-ref instead of rev-parse
remote: cache contents of remotes