Allow the test suite to pass in a directory whose name contains spaces
[gitweb.git] / remote-testsvn.c
index f599c372c64dd8930f9640e9503f73c5edaff49c..f87bf851ba75af9229b1a9171191673af330505b 100644 (file)
@@ -154,7 +154,7 @@ static void check_or_regenerate_marks(int latestrev)
                fclose(marksfile);
        } else {
                strbuf_addf(&sb, ":%d ", latestrev);
-               while (strbuf_getline(&line, marksfile, '\n') != EOF) {
+               while (strbuf_getline_lf(&line, marksfile) != EOF) {
                        if (starts_with(line.buf, sb.buf)) {
                                found++;
                                break;
@@ -284,7 +284,7 @@ static int do_command(struct strbuf *line)
        return 0;
 }
 
-int main(int argc, char **argv)
+int cmd_main(int argc, const char **argv)
 {
        struct strbuf buf = STRBUF_INIT, url_sb = STRBUF_INIT,
                        private_ref_sb = STRBUF_INIT, marksfilename_sb = STRBUF_INIT,
@@ -292,7 +292,6 @@ int main(int argc, char **argv)
        static struct remote *remote;
        const char *url_in;
 
-       git_extract_argv0_path(argv[0]);
        setup_git_directory();
        if (argc < 2 || argc > 3) {
                usage("git-remote-svn <remote-name> [<url>]");
@@ -322,7 +321,7 @@ int main(int argc, char **argv)
        marksfilename = marksfilename_sb.buf;
 
        while (1) {
-               if (strbuf_getline(&buf, stdin, '\n') == EOF) {
+               if (strbuf_getline_lf(&buf, stdin) == EOF) {
                        if (ferror(stdin))
                                die("Error reading command stream");
                        else