1 diff a/Makefile b/Makefile
4 @@ -20,7 +20,7 @@ INSTALL=install
6 SCRIPTS=git-apply-patch-script git-merge-one-file-script git-prune-script \
7 git-pull-script git-tag-script git-resolve-script git-whatchanged \
9 + git-deltafy-script git-fetch-script
11 PROG= git-update-index git-diff-files git-init-db git-write-tree \
12 git-read-tree git-commit-tree git-cat-file git-fsck-cache \
13 diff a/git-fetch-script b/git-fetch-script
15 +++ b/git-fetch-script
20 +merge_name=${2:-HEAD}
23 +: ${GIT_OBJECT_DIRECTORY="${SHA1_FILE_DIRECTORY-"$GIT_DIR/objects"}"}
26 + # remote_path="$1" local_file="$2"
29 + wget -q -O "$2" "$1" ;;
31 + test -f "$1" && cat >"$2" "$1" ;;
33 + rsync -L "$1" "$2" ;;
37 +download_objects () {
38 + # remote_repo="$1" head_sha1="$2"
41 + git-http-pull -a "$2" "$1/"
44 + git-local-pull -l -a "$2" "$1/"
47 + rsync -avz --ignore-existing \
48 + "$1/objects/." "$GIT_OBJECT_DIRECTORY"/.
53 +echo "Getting remote $merge_name"
54 +download_one "$merge_repo/$merge_name" "$GIT_DIR"/MERGE_HEAD
56 +echo "Getting object database"
57 +download_objects "$merge_repo" "$(cat "$GIT_DIR"/MERGE_HEAD)"
58 diff a/git-pull-script b/git-pull-script
61 @@ -6,39 +6,7 @@ merge_name=${2:-HEAD}
63 : ${GIT_OBJECT_DIRECTORY="${SHA1_FILE_DIRECTORY-"$GIT_DIR/objects"}"}
66 - # remote_path="$1" local_file="$2"
69 - wget -q -O "$2" "$1" ;;
71 - test -f "$1" && cat >"$2" "$1" ;;
73 - rsync -L "$1" "$2" ;;
77 -download_objects () {
78 - # remote_repo="$1" head_sha1="$2"
81 - git-http-pull -a "$2" "$1/"
84 - git-local-pull -l -a "$2" "$1/"
87 - rsync -avz --ignore-existing \
88 - "$1/objects/." "$GIT_OBJECT_DIRECTORY"/.
93 -echo "Getting remote $merge_name"
94 -download_one "$merge_repo/$merge_name" "$GIT_DIR"/MERGE_HEAD
96 -echo "Getting object database"
97 -download_objects "$merge_repo" "$(cat "$GIT_DIR"/MERGE_HEAD)"
98 +git-fetch-script "$merge_repo" "$merge_name"
101 "$(cat "$GIT_DIR"/HEAD)" \