5 echo >&2 "usage: $0 [--heads] [--tags] <repository> <refs>..."
9 while case "$#" in 0) break;; esac
12 -h|--h|--he|--hea|--head|--heads)
14 -t|--t|--ta|--tag|--tags)
25 case "$#" in 0) usage ;; esac
27 case ",$heads,$tags," in
28 ,,,) heads=heads tags=tags other=other ;;
32 peek_repo="$(get_remote_url "$@")"
36 trap "rm -fr $tmp-*" 0 1 2 3 15
40 http://* | https://* )
41 if [ -n "$GIT_SSL_NO_VERIFY" ]; then
44 curl -nsf $curl_extra_args "$peek_repo/info/refs" ||
45 echo "failed slurping"
50 rsync -rq "$peek_repo/refs" $tmpdir || {
51 echo "failed slurping"
54 (cd $tmpdir && find refs -type f) |
57 cat "$tmpdir/$path" | tr -d '\012'
64 git-peek-remote "$peek_repo" ||
65 echo "failed slurping"
73 die "Failed to find remote refs"
83 case ",$heads,$tags,$other," in