3 . git-sh-setup || die
"Not a git archive"
6 echo >&2 "usage: $0 [--heads] [--tags] <repository> <refs>..."
10 while case "$#" in 0) break;; esac
13 -h|
--h|
--he|
--hea|
--head|
--heads)
15 -t|
--t|
--ta|
--tag|
--tags)
26 case "$#" in 0) usage
;; esac
28 case ",$heads,$tags," in
29 ,,,) heads
=heads tags
=tags other
=other
;;
33 peek_repo
="$(get_remote_url "$@
")"
37 trap "rm -fr $tmp-*" 0 1 2 3 15
41 http
://* | https
://* )
42 if [ -n "$GIT_SSL_NO_VERIFY" ]; then
45 curl
-nsf $curl_extra_args "$peek_repo/info/refs" ||
46 echo "failed slurping"
51 rsync
-rq "$peek_repo/refs" $tmpdir ||
{
52 echo "failed slurping"
55 (cd $tmpdir && find refs
-type f
) |
58 cat "$tmpdir/$path" |
tr -d '\012'
65 git-peek-remote
"$peek_repo" ||
66 echo "failed slurping"
74 die
"Failed to find remote refs"
84 case ",$heads,$tags,$other," in