aboutsummaryrefslogtreecommitdiffstats
path: root/git-clone-script
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-08 17:07:12 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-08 17:07:12 -0700
commit7558ef89edce07555c6436cfcb98c31388dd99b0 (patch)
tree729fc68a9d4f8d7c0db8d1e36dcc749e458ea7fc /git-clone-script
parent113b94751d7f10617e22de0d017033a52b224c68 (diff)
downloadgit-7558ef89edce07555c6436cfcb98c31388dd99b0.tar.gz
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.
Diffstat (limited to 'git-clone-script')
-rwxr-xr-xgit-clone-script14
1 files changed, 13 insertions, 1 deletions
diff --git a/git-clone-script b/git-clone-script
index 19697427ec..01707e92aa 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