summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ad7db62)
raw | patch | inline | side by side (parent: ad7db62)
author | Josef Weidendorfer <Josef.Weidendorfer@gmx.de> | |
Thu, 10 Nov 2005 13:12:19 +0000 (14:12 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 10 Nov 2005 23:57:56 +0000 (15:57 -0800) |
Otherwise, git-clone silently failed to clone a remote
repository where redirections (ie. a response with a
"Location" header line) are used.
This includes the fixes from Nick Hengeveld.
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
repository where redirections (ie. a response with a
"Location" header line) are used.
This includes the fixes from Nick Hengeveld.
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-clone.sh | patch | blob | history | |
git-fetch.sh | patch | blob | history | |
http-fetch.c | patch | blob | history |
diff --git a/git-clone.sh b/git-clone.sh
index 4fdd6525148d50bd3a014bfc0f60eefd0f16efb9..aafcc18abafb8befd82165587cc9142ed42eb009 100755 (executable)
--- a/git-clone.sh
+++ b/git-clone.sh
http_fetch () {
# $1 = Remote, $2 = Local
- curl -nsf $curl_extra_args "$1" >"$2"
+ curl -nsfL $curl_extra_args "$1" >"$2"
}
clone_dumb_http () {
diff --git a/git-fetch.sh b/git-fetch.sh
index 31e5f4c7225df3d279b78f67ebd0f7a8c87ede40..8564cbfd7abaf0c5aff8d79d660f40b6747d25a0 100755 (executable)
--- a/git-fetch.sh
+++ b/git-fetch.sh
$u =~ s{([^-a-zA-Z0-9/.])}{sprintf"%%%02x",ord($1)}eg;
print "$u";
' "$remote_name")
- head=$(curl -nsf $curl_extra_args "$remote/$remote_name_quoted") &&
+ head=$(curl -nsfL $curl_extra_args "$remote/$remote_name_quoted") &&
expr "$head" : "$_x40\$" >/dev/null ||
die "Failed to fetch $remote_name from $remote"
echo >&2 Fetching "$remote_name from $remote" using http
diff --git a/http-fetch.c b/http-fetch.c
index 88b74b434194b0648c21225bac9ecfbe05491a93..99921cc8da13abc33b389f9df691f56200d20ef3 100644 (file)
--- a/http-fetch.c
+++ b/http-fetch.c
curl_low_speed_time);
}
+ curl_easy_setopt(result, CURLOPT_FOLLOWLOCATION, 1);
+
return result;
}