X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=git-fetch-script;h=acb1e56e70a974d276eb915a51fc5351801b24a5;hb=0ee19dce2cc21f15fa77e2eb01bdaa3eb490d8ac;hp=244fc50d5e16bfdf6f1a490a61631e6dde5f214d;hpb=0a623e7ce8aedd938e8fd5611ccf7ae28c1eb7d9;p=git.git diff --git a/git-fetch-script b/git-fetch-script index 244fc50d..acb1e56e 100755 --- a/git-fetch-script +++ b/git-fetch-script @@ -9,14 +9,15 @@ if [ "$2" = "tag" ]; then destination="$merge_name" fi -: ${GIT_DIR=.git} -: ${GIT_OBJECT_DIRECTORY="${SHA1_FILE_DIRECTORY-"$GIT_DIR/objects"}"} +. git-sh-setup-script || die "Not a git archive" + TMP_HEAD="$GIT_DIR/TMP_HEAD" case "$merge_repo" in http://*) head=$(wget -q -O - "$merge_repo/$merge_name") || exit 1 - git-http-pull -a "$head" "$merge_repo" + echo Fetching $head using http + git-http-pull -v -a "$head" "$merge_repo/" ;; rsync://*) rsync -L "$merge_repo/$merge_name" "$TMP_HEAD" || exit 1