aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-clone.sh2
-rwxr-xr-xgit-fetch.sh2
-rw-r--r--http-fetch.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/git-clone.sh b/git-clone.sh
index 4fdd65251..aafcc18ab 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -23,7 +23,7 @@ fi
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 31e5f4c72..8564cbfd7 100755
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -230,7 +230,7 @@ do
$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 88b74b434..99921cc8d 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -269,6 +269,8 @@ static CURL* get_curl_handle(void)
curl_low_speed_time);
}
+ curl_easy_setopt(result, CURLOPT_FOLLOWLOCATION, 1);
+
return result;
}