5 echo >&2 "usage: $0 [--heads] [--tags] [-u|--upload-pack <upload-pack>]"
6 echo >&2 " <repository> <refs>..."
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)
26 exec="--upload-pack=$1"
28 -u=*|
--u=*|
--up=*|
--upl=*|
--uplo=*|
--uploa=*|
--upload=*|\
29 --upload-=*|
--upload-p=*|
--upload-pa=*|
--upload-pac=*|
--upload-pack=*)
30 exec=--upload-pack=$
(expr "z$1" : 'z-[^=]*=\(.*\)')
41 case "$#" in 0) usage
;; esac
43 case ",$heads,$tags," in
44 ,,,) heads
=heads tags
=tags other
=other
;;
48 peek_repo
="$(get_remote_url "$@
")"
52 trap "rm -fr $tmp-*" 0 1 2 3 15
56 http
://* | https
://* |
ftp://* )
57 if [ -n "$GIT_SSL_NO_VERIFY" -o \
58 "`git config --bool http.sslVerify`" = false
]; then
61 if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
62 "`git config --bool http.noEPSV`" = true
]; then
63 curl_extra_args
="${curl_extra_args} --disable-epsv"
65 curl
-nsf $curl_extra_args --header "Pragma: no-cache" "$peek_repo/info/refs" ||
66 echo "failed slurping"
71 rsync
-rlq "$peek_repo/HEAD" $tmpdir &&
72 rsync
-rq "$peek_repo/refs" $tmpdir ||
{
73 echo "failed slurping"
76 head=$
(cat "$tmpdir/HEAD") &&
79 head=$
(expr "z$head" : 'zref: \(.*\)') &&
80 head=$
(cat "$tmpdir/$head") ||
exit
83 (cd $tmpdir && find refs
-type f
) |
86 tr -d '\012' <"$tmpdir/$path"
93 if test -f "$peek_repo" ; then
94 git bundle list-heads
"$peek_repo" ||
95 echo "failed slurping"
97 git-peek-remote
$exec "$peek_repo" ||
98 echo "failed slurping"
117 case ",$heads,$tags,$other," in