X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-ls-remote.sh;h=2fdcaf7886850b1f59a1775bffc23948d1b62c6a;hb=fd7e9fb7ae206a64b87c7faecfc88716e98a7577;hp=b6882a90c15a7b706966e608e00facbb80f26422;hpb=12d81ce59846e17676c5534257ca2f1783829d63;p=git.git diff --git a/git-ls-remote.sh b/git-ls-remote.sh index b6882a90..2fdcaf78 100755 --- a/git-ls-remote.sh +++ b/git-ls-remote.sh @@ -58,11 +58,19 @@ http://* | https://* ) ;; rsync://* ) - mkdir $tmpdir + mkdir $tmpdir && + rsync -rlq "$peek_repo/HEAD" $tmpdir && rsync -rq "$peek_repo/refs" $tmpdir || { echo "failed slurping" exit } + head=$(cat "$tmpdir/HEAD") && + case "$head" in + ref:' '*) + head=$(expr "z$head" : 'zref: \(.*\)') && + head=$(cat "$tmpdir/$head") || exit + esac && + echo "$head HEAD" (cd $tmpdir && find refs -type f) | while read path do