5 echo >&2 "usage: $0 [--heads] [--tags] [-u|--upload-pack <upload-pack>]"
6 echo >&2 " <repository> <refs>..."
16 while case "$#" in 0) break;; esac
19 -h|
--h|
--he|
--hea|
--head|
--heads)
21 -t|
--t|
--ta|
--tag|
--tags)
23 -u|
--u|
--up|
--upl|
--uploa|
--upload|
--upload-|
--upload-p|
--upload-pa|\
24 --upload-pac|
--upload-pack)
37 case "$#" in 0) usage
;; esac
39 case ",$heads,$tags," in
40 ,,,) heads
=heads tags
=tags other
=other
;;
44 peek_repo
="$(get_remote_url "$@
")"
48 trap "rm -fr $tmp-*" 0 1 2 3 15
52 http
://* | https
://* )
53 if [ -n "$GIT_SSL_NO_VERIFY" ]; then
56 curl
-nsf $curl_extra_args "$peek_repo/info/refs" ||
57 echo "failed slurping"
62 rsync
-rq "$peek_repo/refs" $tmpdir ||
{
63 echo "failed slurping"
66 (cd $tmpdir && find refs
-type f
) |
69 cat "$tmpdir/$path" |
tr -d '\012'
76 git-peek-remote
$exec "$peek_repo" ||
77 echo "failed slurping"
85 die
"Failed to find remote refs"
95 case ",$heads,$tags,$other," in