* [PATCH] ls-remote fix for rsync:// transport
@ 2006-05-25 4:22 Junio C Hamano
[not found] ` <20060525010125.e2d6325d.seanlkml@sympatico.ca>
0 siblings, 1 reply; 2+ messages in thread
From: Junio C Hamano @ 2006-05-25 4:22 UTC (permalink / raw)
To: git
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
;;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-05-25 5:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-25 4:22 [PATCH] ls-remote fix for rsync:// transport Junio C Hamano
[not found] ` <20060525010125.e2d6325d.seanlkml@sympatico.ca>
2006-05-25 5:01 ` Sean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox