Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
ls-remote: fix rsync:// to report HEAD
author
Junio C Hamano
<junkio@cox.net>
Thu, 25 May 2006 04:36:14 +0000
(21:36 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Thu, 25 May 2006 04:36:14 +0000
(21:36 -0700)
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>
git-ls-remote.sh
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
84c667f
)
diff --git
a/git-ls-remote.sh
b/git-ls-remote.sh
index b6882a90c15a7b706966e608e00facbb80f26422..2fdcaf7886850b1f59a1775bffc23948d1b62c6a 100755
(executable)
--- a/
git-ls-remote.sh
+++ b/
git-ls-remote.sh
@@
-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