diff options
author | Junio C Hamano <junkio@cox.net> | 2006-05-24 22:32:38 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-05-24 22:32:38 -0700 |
commit | 84138845c56306d1c455b89a6be7fbdc4f2ead04 (patch) | |
tree | 7ead45d4420c683fdb8270e760f5cf242548d6e9 /git-ls-remote.sh | |
parent | Merge branch 'sp/reflog' into next (diff) | |
parent | fetch-pack: give up after getting too many "ack continue" (diff) | |
download | tgif-84138845c56306d1c455b89a6be7fbdc4f2ead04.tar.xz |
Merge branch 'jc/fetchupload' into next
* jc/fetchupload:
fetch-pack: give up after getting too many "ack continue"
cat-file: document -p option
Built git-upload-tar should be ignored.
ls-remote: fix rsync:// to report HEAD
Diffstat (limited to 'git-ls-remote.sh')
-rwxr-xr-x | git-ls-remote.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/git-ls-remote.sh b/git-ls-remote.sh index b6882a90c1..2fdcaf7886 100755 --- 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 |