projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
113b947
)
Teach "git clone" about rsync sources
author
Linus Torvalds
<torvalds@g5.osdl.org>
Sat, 9 Jul 2005 00:07:12 +0000
(17:07 -0700)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Sat, 9 Jul 2005 00:07:12 +0000
(17:07 -0700)
That will be the normal way of cloning anonymously for a while, so let's
make sure it's easy to use.
git-clone-script
patch
|
blob
|
history
diff --git
a/git-clone-script
b/git-clone-script
index
1969742
..
01707e9
100755
(executable)
--- 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