Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-09 04:07:12 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-09 04:07:12 +0400
commit7558ef89edce07555c6436cfcb98c31388dd99b0 (patch)
tree729fc68a9d4f8d7c0db8d1e36dcc749e458ea7fc /git-clone-script
parent113b94751d7f10617e22de0d017033a52b224c68 (diff)
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