From: Junio C Hamano Date: Thu, 25 May 2006 04:36:14 +0000 (-0700) Subject: ls-remote: fix rsync:// to report HEAD X-Git-Tag: v1.4.0-rc1~70 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e686eba41f1d19a5731dd12cabe259fd3c17eed6;p=git.git ls-remote: fix rsync:// to report HEAD This prevented recent git-clone from checking out the working tree files in the cloned repository. Signed-off-by: Junio C Hamano --- diff --git a/git-ls-remote.sh b/git-ls-remote.sh index b6882a90c..2fdcaf788 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