Skip to content

Commit

Permalink
ls-remote: fix rsync:// to report HEAD
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed May 25, 2006
1 parent 84c667f commit e686eba
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion git-ls-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e686eba

Please sign in to comment.