Code

Merge branch 'rc/maint-curl-helper' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 16 Jun 2010 23:19:43 +0000 (16:19 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Jun 2010 23:19:43 +0000 (16:19 -0700)
* 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

1  2 
http.c
remote-curl.c
t/t5541-http-push.sh

diff --cc http.c
Simple merge
diff --cc remote-curl.c
index b76bfcb3d3cdbbee2e3279a6696c7d6b526176d7,1fe59d6db0e85ab938959f08d3bca4a83f748ab5..9c7fcf29566caa3813bd91a22fc78a00cec05335
@@@ -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;
@@@ -798,13 -805,13 +798,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;
Simple merge