Makefile: stop pretending to support rpmbuild
[gitweb.git] / remote-testsvn.c
index 686e07d317bf157461f0ce680958a466675c80bc..f05ff45298207258c257c2118206fbbfa0a4c670 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "refs.h"
 #include "remote.h"
 #include "strbuf.h"
 #include "url.h"
@@ -153,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;
@@ -175,7 +176,7 @@ static int cmd_import(const char *line)
        char *note_msg;
        unsigned char head_sha1[20];
        unsigned int startrev;
-       struct child_process svndump_proc;
+       struct child_process svndump_proc = CHILD_PROCESS_INIT;
        const char *command = "svnrdump";
 
        if (read_ref(private_ref, head_sha1))
@@ -200,7 +201,6 @@ static int cmd_import(const char *line)
                if(dumpin_fd < 0)
                        die_errno("Couldn't open svn dump file %s.", url);
        } else {
-               memset(&svndump_proc, 0, sizeof(struct child_process));
                svndump_proc.out = -1;
                argv_array_push(&svndump_proc.args, command);
                argv_array_push(&svndump_proc.args, "dump");
@@ -322,7 +322,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