Skip to content

Commit ddaf731

Browse files
Tuncer AyazJunio C Hamano
authored andcommitted
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>
1 parent a4e3bdd commit ddaf731

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git-fetch.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ fetch_main () {
287287
# There are transports that can fetch only one head at a time...
288288
case "$remote" in
289289
http://* | https://* | ftp://*)
290+
proto=`expr "$remote" : '\([^:]*\):'`
290291
if [ -n "$GIT_SSL_NO_VERIFY" ]; then
291292
curl_extra_args="-k"
292293
fi
@@ -310,7 +311,7 @@ fetch_main () {
310311
done
311312
expr "z$head" : "z$_x40\$" >/dev/null ||
312313
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"
314315
git-http-fetch -v -a "$head" "$remote/" || exit
315316
;;
316317
rsync://*)

0 commit comments

Comments
 (0)