I think this would fix the "cloning rsync:// clones repository fine but does not check out the working tree" problem. --- diff --git a/git-ls-remote.sh b/git-ls-remote.sh index b6882a9..6b21879 100755 --- a/git-ls-remote.sh +++ b/git-ls-remote.sh @@ -58,7 +58,8 @@ http://* | https://* ) ;; rsync://* ) - mkdir $tmpdir + mkdir $tmpdir && + rsync -rlq "$peek_repo/HEAD" $tmpdir && rsync -rq "$peek_repo/refs" $tmpdir || { echo "failed slurping" exit @@ -69,6 +70,13 @@ rsync://* ) cat "$tmpdir/$path" | tr -d '\012' echo " $path" done && + head=$(cat "$tmpdir/HEAD") && + case "$head" in + ref:' '*) + head=$(expr "z$head" : 'zref: \(.*\)') && + head=$(cat "$tmpdir/$head") || exit + esac && + echo "$head HEAD" rm -fr $tmpdir ;; - : send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html