Commits

Anonymous committed 7558ef8

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.

  • Participants
  • Parent commits 113b947

Comments (0)

Files changed (1)

File git-clone-script

 	;;
 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