From: Junio C Hamano Date: Sun, 9 May 2010 05:37:24 +0000 (-0700) Subject: Merge branch 'rc/maint-curl-helper' X-Git-Tag: v1.7.2-rc0~148 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3cc9caadf738c3b2cf7aa46364be173751912a10;p=git.git Merge branch 'rc/maint-curl-helper' * rc/maint-curl-helper: remote-curl: ensure that URLs have a trailing slash http: make end_url_with_slash() public t5541-http-push: add test for URLs with trailing slash Conflicts: remote-curl.c --- 3cc9caadf738c3b2cf7aa46364be173751912a10 diff --cc remote-curl.c index 07827562b,1fe59d6db..24fbb9a9b --- a/remote-curl.c +++ b/remote-curl.c @@@ -9,7 -9,8 +9,7 @@@ #include "sideband.h" static struct remote *remote; - static const char *url; + static const char *url; /* always ends with a trailing slash */ -static struct walker *walker; struct options { int verbosity; @@@ -800,13 -805,13 +800,15 @@@ int main(int argc, const char **argv remote = remote_get(argv[1]); if (argc > 2) { - url = argv[2]; + end_url_with_slash(&buf, argv[2]); } else { - url = remote->url[0]; + end_url_with_slash(&buf, remote->url[0]); } + url = strbuf_detach(&buf, NULL); + + http_init(remote); + do { if (strbuf_getline(&buf, stdin, '\n') == EOF) break;