From: Junio C Hamano Date: Thu, 15 Sep 2016 21:11:15 +0000 (-0700) Subject: Merge branch 'jk/fix-remote-curl-url-wo-proto' X-Git-Tag: v2.11.0-rc0~149 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c13f458d869fefb603c63ae7bf65fe3d595a8a83 Merge branch 'jk/fix-remote-curl-url-wo-proto' "git fetch http::/site/path" did not die correctly and segfaulted instead. * jk/fix-remote-curl-url-wo-proto: remote-curl: handle URLs without protocol --- c13f458d869fefb603c63ae7bf65fe3d595a8a83 diff --cc t/t5550-http-fetch-dumb.sh index dc9b87d6b4,9249140f99..7641417b4a --- a/t/t5550-http-fetch-dumb.sh +++ b/t/t5550-http-fetch-dumb.sh @@@ -295,9 -246,17 +295,17 @@@ ja;q=0.95, zh;q=0.94, sv;q=0.93, pt;q=0 ' test_expect_success 'git client does not send an empty Accept-Language' ' - GIT_CURL_VERBOSE=1 LANGUAGE= git ls-remote "$HTTPD_URL/dumb/repo.git" 2>stderr && - ! grep "^Accept-Language:" stderr + GIT_TRACE_CURL=true LANGUAGE= git ls-remote "$HTTPD_URL/dumb/repo.git" 2>stderr && + ! grep "^=> Send header: Accept-Language:" stderr ' + test_expect_success 'remote-http complains cleanly about malformed urls' ' + # do not actually issue "list" or other commands, as we do not + # want to rely on what curl would actually do with such a broken + # URL. This is just about making sure we do not segfault during + # initialization. + test_must_fail git remote-http http::/example.com/repo.git + ' + stop_httpd test_done