@matheusbsbs / matheus-bagliano / commits / e686eba41f
Fork 0

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 <junkio@cox.net>

Junio C Hamano committed May 24, 2006 at 21:36 UTC e686eba41f1d19a5731dd12cabe259fd3c17eed6
1 file changed +9 -1
git-ls-remote.sh
+9 -1
@@ -58,11 +58,19 @@ http://* | https://* )
58 ;;
59
60 rsync://* )
61 - mkdir $tmpdir
61 + mkdir $tmpdir &&
62 + rsync -rlq "$peek_repo/HEAD" $tmpdir &&
63 rsync -rq "$peek_repo/refs" $tmpdir || {
64 echo "failed slurping"
65 exit
66 }
67 + head=$(cat "$tmpdir/HEAD") &&
68 + case "$head" in
69 + ref:' '*)
70 + head=$(expr "z$head" : 'zref: \(.*\)') &&
71 + head=$(cat "$tmpdir/$head") || exit
72 + esac &&
73 + echo "$head HEAD"
74 (cd $tmpdir && find refs -type f) |
75 while read path
76 do