Skip to content

Commit 7558ef8

Browse files
author
Linus Torvalds
committed
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.
1 parent 113b947 commit 7558ef8

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

git-clone-script

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,16 @@ yes,yes)
7979
;;
8080
esac
8181

82-
cd "$D" && git clone-pack "$repo"
82+
case "$repo" in
83+
rsync://*)
84+
rsync -avz --ignore-existing "$repo/objects/" "$D/.git/objects/" &&
85+
rsync -avz --ignore-existing "$repo/refs/" "$D/.git/refs/"
86+
;;
87+
http://*)
88+
echo "Somebody should add http fetch" >&2
89+
exit 1
90+
;;
91+
*)
92+
cd "$D" && git-clone-pack "$repo"
93+
;;
94+
esac

0 commit comments

Comments
 (0)