Skip to content

Commit 0562110

Browse files
author
Junio C Hamano
committed
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: Junio C Hamano <junkio@cox.net>
1 parent 797bd6f commit 0562110

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

git-clone.sh

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,11 @@ clone_dumb_http () {
3131
cd "$2" &&
3232
clone_tmp='.git/clone-tmp' &&
3333
mkdir -p "$clone_tmp" || exit 1
34-
http_fetch "$1/info/refs" "$clone_tmp/refs" &&
35-
http_fetch "$1/objects/info/packs" "$clone_tmp/packs" || {
34+
http_fetch "$1/info/refs" "$clone_tmp/refs" || {
3635
echo >&2 "Cannot get remote repository information.
3736
Perhaps git-update-server-info needs to be run there?"
3837
exit 1;
3938
}
40-
while read type name
41-
do
42-
case "$type" in
43-
P) ;;
44-
*) continue ;;
45-
esac &&
46-
47-
idx=`expr "$name" : '\(.*\)\.pack'`.idx
48-
http_fetch "$1/objects/pack/$name" ".git/objects/pack/$name" &&
49-
http_fetch "$1/objects/pack/$idx" ".git/objects/pack/$idx" &&
50-
git-verify-pack ".git/objects/pack/$idx" || exit 1
51-
done <"$clone_tmp/packs"
52-
5339
while read sha1 refname
5440
do
5541
name=`expr "$refname" : 'refs/\(.*\)'` &&

0 commit comments

Comments
 (0)