#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;
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;