Commit Diff


commit - 5f94a4e005d31b60559a66dd5fa48b0ed7348d83
commit + 0deb960709e3e94b2b79beb88bafc443d6d117f1
blob - 63af2b9f40b9e8782cba105f307f72d0a7180caa
blob + ad0fec63ec6030f40937e7bf6836769359bb55ba
--- got/got.c
+++ got/got.c
@@ -1694,8 +1694,7 @@ cmd_clone(int argc, char *argv[])
 		goto done;
 
 	if (verbosity >= 0)
-		printf("Connecting to %s%s%s\n", host,
-		    port ? ":" : "", port ? port : "");
+		printf("Connecting to %s\n", git_url);
 
 	error = got_fetch_connect(&fetchpid, &fetchfd, proto, host, port,
 	    server_path, verbosity);
@@ -2538,9 +2537,12 @@ cmd_fetch(int argc, char *argv[])
 	if (error)
 		goto done;
 
-	if (verbosity >= 0)
-		printf("Connecting to \"%s\" %s%s%s\n", remote->name, host,
-		    port ? ":" : "", port ? port : "");
+	if (verbosity >= 0) {
+		printf("Connecting to \"%s\" %s://%s%s%s%s%s\n",
+		    remote->name, proto, host,
+		    port ? ":" : "", port ? port : "",
+		    *server_path == '/' ? "" : "/", server_path);
+	}
 
 	error = got_fetch_connect(&fetchpid, &fetchfd, proto, host, port,
 	    server_path, verbosity);
@@ -9215,9 +9217,12 @@ cmd_send(int argc, char *argv[])
 		nbranches++;
 	}
 
-	if (verbosity >= 0)
-		printf("Connecting to \"%s\" %s%s%s\n", remote->name, host,
-		    port ? ":" : "", port ? port : "");
+	if (verbosity >= 0) {
+		printf("Connecting to \"%s\" %s://%s%s%s%s%s\n",
+		    remote->name, proto, host,
+		    port ? ":" : "", port ? port : "",
+		    *server_path == '/' ? "" : "/", server_path);
+	}
 
 	error = got_send_connect(&sendpid, &sendfd, proto, host, port,
 	    server_path, verbosity);
blob - 6881cc1cec543e7bfd4986adaba1e99620dfeabd
blob + edb0516b38e63ce6695a517988a05d6c9a5266e3
--- regress/cmdline/clone.sh
+++ regress/cmdline/clone.sh
@@ -132,7 +132,7 @@ EOF
 
 test_clone_list() {
 	local testroot=`test_init clone_list`
-	local testurl=ssh://127.0.0.1/$testroot
+	local testurl=ssh://127.0.0.1$testroot
 	local commit_id=`git_show_head $testroot/repo`
 
 	got branch -r $testroot/repo -c $commit_id foo
@@ -147,7 +147,7 @@ test_clone_list() {
 		return 1
 	fi
 
-	echo "Connecting to 127.0.0.1" > $testroot/stdout.expected
+	echo "Connecting to $testurl/repo" > $testroot/stdout.expected
 	got ref -l -r $testroot/repo >> $testroot/stdout.expected
 
 	cmp -s $testroot/stdout $testroot/stdout.expected
blob - 2bfbfe22cdf4a0255e78921e2da2bfcc76ffb03c
blob + db8ed49392c78fe028db90d4d5c318b3d0fa8130
--- regress/cmdline/send.sh
+++ regress/cmdline/send.sh
@@ -129,7 +129,8 @@ EOF
 		return 1
 	fi
 
-	echo 'Connecting to "origin" 127.0.0.1' > $testroot/stdout.expected
+	echo "Connecting to \"origin\" ssh://127.0.0.1$testroot/repo-clone" \
+		> $testroot/stdout.expected
 	echo "Already up-to-date" >> $testroot/stdout.expected
 	cmp -s $testroot/stdout $testroot/stdout.expected
 	ret=$?
@@ -398,7 +399,8 @@ EOF
 		return 1
 	fi
 
-	echo 'Connecting to "origin" 127.0.0.1' > $testroot/stdout.expected
+	echo "Connecting to \"origin\" ssh://127.0.0.1$testroot/repo-clone" \
+		> $testroot/stdout.expected
 	echo "Server has deleted refs/heads/branch2" \
 		>> $testroot/stdout.expected
 
@@ -1291,7 +1293,8 @@ EOF
 		return 1
 	fi
 
-	echo 'Connecting to "origin" 127.0.0.1' > $testroot/stdout.expected
+	echo "Connecting to \"origin\" ssh://127.0.0.1$testroot/repo2" \
+		> $testroot/stdout.expected
 	echo "Already up-to-date" >> $testroot/stdout.expected
 	cmp -s $testroot/stdout $testroot/stdout.expected
 	ret=$?