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>
Tuncer Ayaz committed
Oct 25, 2006 at 12:03 UTC
ddaf73141c03aeaab5e8cf5fadaf8b7ebad7955b
1 file changed
+2
-1
git-fetch.sh
+2
-1
@@ -287,6 +287,7 @@ fetch_main () {
287
# There are transports that can fetch only one head at a time...
288
case "$remote" in
289
http://* | https://* | ftp://*)
290
+ proto=`expr "$remote" : '\([^:]*\):'`
291
if [ -n "$GIT_SSL_NO_VERIFY" ]; then
292
curl_extra_args="-k"
293
fi
@@ -310,7 +311,7 @@ fetch_main () {
311
done
312
expr "z$head" : "z$_x40\$" >/dev/null ||
313
die "Failed to fetch $remote_name from $remote"
313
- echo >&2 Fetching "$remote_name from $remote" using http
314
+ echo >&2 "Fetching $remote_name from $remote using $proto"
315
git-http-fetch -v -a "$head" "$remote/" || exit
316
;;
317
rsync://*)