X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-clone.sh;h=fdd354f2da1978241a3e79a47a067496150cc1bc;hb=bc32fed5516375ef78bc0f6270eb57bf1bb12d47;hp=de51983584bb0fd015ed75704b72bec8fdb55430;hpb=803527f1d9b284fa848d4a4bad23158c162a5d54;p=git.git diff --git a/git-clone.sh b/git-clone.sh index de5198358..fdd354f2d 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -18,7 +18,14 @@ usage() { } get_repo_base() { - (cd "$1" && (cd .git ; pwd)) 2> /dev/null + ( + cd "`/bin/pwd`" && + cd "$1" && + { + cd .git + pwd + } + ) 2>/dev/null } if [ -n "$GIT_SSL_NO_VERIFY" ]; then @@ -42,6 +49,7 @@ clone_dumb_http () { http_fetch "$1/info/refs" "$clone_tmp/refs" || die "Cannot get remote repository information. Perhaps git-update-server-info needs to be run there?" + test "z$quiet" = z && v=-v || v= while read sha1 refname do name=`expr "z$refname" : 'zrefs/\(.*\)'` && @@ -59,7 +67,7 @@ Perhaps git-update-server-info needs to be run there?" else tname=$name fi - git-http-fetch -v -a -w "$tname" "$name" "$1/" || exit 1 + git-http-fetch $v -a -w "$tname" "$sha1" "$1" || exit 1 done <"$clone_tmp/refs" rm -fr "$clone_tmp" http_fetch "$1/HEAD" "$GIT_DIR/REMOTE_HEAD" ||