Skip to content

Commit

Permalink
Teach "git clone" about rsync sources
Browse files Browse the repository at this point in the history
That will be the normal way of cloning anonymously for a while, so let's
make sure it's easy to use.
  • Loading branch information
Linus Torvalds committed Jul 9, 2005
1 parent 113b947 commit 7558ef8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion git-clone-script
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7558ef8

Please sign in to comment.