5 echo >&2 "usage: $0 [--heads] [--tags] <repository> <refs>..."
14 while case "$#" in 0) break;; esac
17 -h|--h|--he|--hea|--head|--heads)
19 -t|--t|--ta|--tag|--tags)
30 case "$#" in 0) usage ;; esac
32 case ",$heads,$tags," in
33 ,,,) heads=heads tags=tags other=other ;;
37 peek_repo="$(get_remote_url "$@")"
41 trap "rm -fr $tmp-*" 0 1 2 3 15
45 http://* | https://* )
46 if [ -n "$GIT_SSL_NO_VERIFY" ]; then
49 curl -nsf $curl_extra_args "$peek_repo/info/refs" ||
50 echo "failed slurping"
55 rsync -rq "$peek_repo/refs" $tmpdir || {
56 echo "failed slurping"
59 (cd $tmpdir && find refs -type f) |
62 cat "$tmpdir/$path" | tr -d '\012'
69 git-peek-remote "$peek_repo" ||
70 echo "failed slurping"
78 die "Failed to find remote refs"
88 case ",$heads,$tags,$other," in