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>
This commit is contained in:
parent
84c667ff97
commit
e686eba41f
@ -58,11 +58,19 @@ http://* | https://* )
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
rsync://* )
|
rsync://* )
|
||||||
mkdir $tmpdir
|
mkdir $tmpdir &&
|
||||||
|
rsync -rlq "$peek_repo/HEAD" $tmpdir &&
|
||||||
rsync -rq "$peek_repo/refs" $tmpdir || {
|
rsync -rq "$peek_repo/refs" $tmpdir || {
|
||||||
echo "failed slurping"
|
echo "failed slurping"
|
||||||
exit
|
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) |
|
(cd $tmpdir && find refs -type f) |
|
||||||
while read path
|
while read path
|
||||||
do
|
do
|
||||||
|
Loading…
Reference in New Issue
Block a user