git-fetch.sh printed protocol fix
We have supported https:// protocol for some time and in 1.4.3 added ftp:// protocol. The transfer were still reported to be over http. [jc: Tuncer used substring parameter substitution ${remote%%:*} but I am deferring it to a later day. We should replace colon-expr with substring substitution after everybody's shell can grok it someday, but we are not in a hurry. ] Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
a4e3bddc76
commit
ddaf73141c
@ -287,6 +287,7 @@ fetch_main () {
|
|||||||
# There are transports that can fetch only one head at a time...
|
# There are transports that can fetch only one head at a time...
|
||||||
case "$remote" in
|
case "$remote" in
|
||||||
http://* | https://* | ftp://*)
|
http://* | https://* | ftp://*)
|
||||||
|
proto=`expr "$remote" : '\([^:]*\):'`
|
||||||
if [ -n "$GIT_SSL_NO_VERIFY" ]; then
|
if [ -n "$GIT_SSL_NO_VERIFY" ]; then
|
||||||
curl_extra_args="-k"
|
curl_extra_args="-k"
|
||||||
fi
|
fi
|
||||||
@ -310,7 +311,7 @@ fetch_main () {
|
|||||||
done
|
done
|
||||||
expr "z$head" : "z$_x40\$" >/dev/null ||
|
expr "z$head" : "z$_x40\$" >/dev/null ||
|
||||||
die "Failed to fetch $remote_name from $remote"
|
die "Failed to fetch $remote_name from $remote"
|
||||||
echo >&2 Fetching "$remote_name from $remote" using http
|
echo >&2 "Fetching $remote_name from $remote using $proto"
|
||||||
git-http-fetch -v -a "$head" "$remote/" || exit
|
git-http-fetch -v -a "$head" "$remote/" || exit
|
||||||
;;
|
;;
|
||||||
rsync://*)
|
rsync://*)
|
||||||
|
Loading…
Reference in New Issue
Block a user