From: skimo@liacs.nl
To: git@vger.kernel.org, Junio C Hamano <junkio@cox.net>
Subject: [PATCH 3/3] git-clone: rely on git-fetch for non-bare fetching over http
Date: Sun, 20 May 2007 19:57:45 +0200 [thread overview]
Message-ID: <11796838663961-git-send-email-skimo@liacs.nl> (raw)
In-Reply-To: <1179683865547-git-send-email-skimo@liacs.nl>
From: Sven Verdoolaege <skimo@kotnet.org>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
---
git-clone.sh | 6 +++---
git-fetch.sh | 20 ++++++++++++++++++++
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/git-clone.sh b/git-clone.sh
index 823b973..8d5dc05 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -262,8 +262,8 @@ yes,yes)
git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD" || exit 1
;;
*)
- case "$repo" in
- rsync://*)
+ case "$bare,$repo" in
+ *,rsync://*)
case "$depth" in
"") ;;
*) die "shallow over rsync not supported" ;;
@@ -295,7 +295,7 @@ yes,yes)
fi
git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD" || exit 1
;;
- https://*|http://*|ftp://*)
+ yes,https://*|yes,http://*|yes,ftp://*)
case "$depth" in
"") ;;
*) die "shallow over http or ftp not supported" ;;
diff --git a/git-fetch.sh b/git-fetch.sh
index dcb6985..68706db 100755
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -235,11 +235,31 @@ fetch_all_at_once () {
}
+http_fetch () {
+ if [ -n "$GIT_SSL_NO_VERIFY" ]; then
+ curl_extra_args="-k"
+ fi
+ if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
+ "`git-config --bool http.noEPSV`" = true ]; then
+ curl_extra_args="${curl_extra_args} --disable-epsv"
+ fi
+
+ # $1 = Remote, $2 = Local
+ curl -nsfL $curl_extra_args "$1" >"$2"
+}
+
fetch_per_ref () {
reflist="$1"
refs=
rref=
+ if test -n "$all"; then
+ reflist=$(canon_refs_list_for_fetch -d "$remote_nick" \
+ "+refs/heads/*:refs/remotes/$remote_nick/*")
+ http_fetch "$remote/HEAD" "$GIT_DIR/REMOTE_HEAD" ||
+ rm -f "$GIT_DIR/REMOTE_HEAD"
+ fi
+
for ref in $reflist
do
refs="$refs$LF$ref"
--
1.5.1.5.g8fc2
prev parent reply other threads:[~2007-05-20 17:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-20 17:57 Partial removal of fetching from git-clone skimo
2007-05-20 17:57 ` [PATCH 1/3] builtin-fetch--tool: extend "native-store" for use in cloning skimo
2007-05-20 17:57 ` [PATCH 2/3] git-clone: rely on git-fetch for fetching for most protocols skimo
2007-05-20 17:57 ` skimo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11796838663961-git-send-email-skimo@liacs.nl \
--to=skimo@liacs.nl \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).