Support cloning packed repo from dumb http servers.
PATCH 6/6 Support cloning packed repo from dumb http servers.
Using the information prepared with update-server-info, a truly dumb http server can allow cloning with this client side support.
Signed-off-by Junio C Hamano <[email protected]>
---
Makefile | 2 +- git-clone-dumb-http | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ git-clone-script | 13 +++++++++++-- 3 files changed, 63 insertions(+), 3 deletions(-) create mode 100755 git-clone-dumb-http
5dd66390cbe5fe0665681ad0d73368085c87b01d
Makefile +1 -1
@@ -37,7 +37,7 @@ SCRIPTS=git git-apply-patch-script git-m gitk git-cherry git-rebase-script git-relink-script git-repack-script \ git-format-patch-script git-sh-setup-script git-push-script \ git-branch-script git-parse-remote git-verify-tag-script \ - git-ls-remote-script + git-ls-remote-script git-clone-dumb-http PROG= git-update-cache git-diff-files git-init-db git-write-tree \ git-read-tree git-commit-tree git-cat-file git-fsck-cache \
git-clone-dumb-http new file +51 -0
51 lines not on this page · raw message
git-clone-script +11 -2
@@ -89,8 +89,17 @@ yes,yes) rsync $quiet -avz --ignore-existing "$repo/refs/" "$D/.git/refs/" ;; http://*) - echo "Somebody should add http fetch" >&2 - exit 1 + git-clone-dumb-http "$repo" "$D" + case "$?" in + 2) + echo "Somebody should define smarter http server protocol" >&2 + exit 1 + ;; + 0) + ;; + *) + exit + esac ;; *) cd "$D" && case "$upload_pack" in