From 7558ef89edce07555c6436cfcb98c31388dd99b0 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 8 Jul 2005 17:07:12 -0700 Subject: [PATCH] Teach "git clone" about rsync sources That will be the normal way of cloning anonymously for a while, so let's make sure it's easy to use. --- git-clone-script | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/git-clone-script b/git-clone-script index 19697427..01707e92 100755 --- a/git-clone-script +++ b/git-clone-script @@ -79,4 +79,16 @@ yes,yes) ;; esac -cd "$D" && git clone-pack "$repo" +case "$repo" in +rsync://*) + rsync -avz --ignore-existing "$repo/objects/" "$D/.git/objects/" && + rsync -avz --ignore-existing "$repo/refs/" "$D/.git/refs/" + ;; +http://*) + echo "Somebody should add http fetch" >&2 + exit 1 + ;; +*) + cd "$D" && git-clone-pack "$repo" + ;; +esac -- 2.11.0