commit 6df5d941837b8287bf5964087c890b24e86bf673 from: Omar Polo via: Thomas Adam date: Fri Nov 18 16:43:09 2022 UTC show full URL during got clone/fetch/send discussed with and ok jamsek, stsp commit - 7a9950a80d85b9aa47ca5e135cd0eb94fbaa474c commit + 6df5d941837b8287bf5964087c890b24e86bf673 blob - dad0b7d03fbf6b57cc05881f0936f42db930e358 blob + 15f993971c3f1fa3771c09ad092f2f5c3d8e6c13 --- 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=$?