提交 05621105 编写于 作者: J Junio C Hamano

git-clone: do not special case dumb http.

Underlying http-fetch is supposed to be capable of handling
packed repositories just fine, so no need to special case it in
the wrapper script.
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 797bd6f4
...@@ -31,25 +31,11 @@ clone_dumb_http () { ...@@ -31,25 +31,11 @@ clone_dumb_http () {
cd "$2" && cd "$2" &&
clone_tmp='.git/clone-tmp' && clone_tmp='.git/clone-tmp' &&
mkdir -p "$clone_tmp" || exit 1 mkdir -p "$clone_tmp" || exit 1
http_fetch "$1/info/refs" "$clone_tmp/refs" && http_fetch "$1/info/refs" "$clone_tmp/refs" || {
http_fetch "$1/objects/info/packs" "$clone_tmp/packs" || {
echo >&2 "Cannot get remote repository information. echo >&2 "Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?" Perhaps git-update-server-info needs to be run there?"
exit 1; exit 1;
} }
while read type name
do
case "$type" in
P) ;;
*) continue ;;
esac &&
idx=`expr "$name" : '\(.*\)\.pack'`.idx
http_fetch "$1/objects/pack/$name" ".git/objects/pack/$name" &&
http_fetch "$1/objects/pack/$idx" ".git/objects/pack/$idx" &&
git-verify-pack ".git/objects/pack/$idx" || exit 1
done <"$clone_tmp/packs"
while read sha1 refname while read sha1 refname
do do
name=`expr "$refname" : 'refs/\(.*\)'` && name=`expr "$refname" : 'refs/\(.*\)'` &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册