]> git.ipfire.org Git - thirdparty/git.git/blobdiff - mailinfo.c
Merge branch 'rs/mailinfo-lib'
[thirdparty/git.git] / mailinfo.c
index 44ea8638f3e63e734b05b5c6b4f94bde0e601f6e..e19abe3cb93e24aed8848cadec8ddf8a8767f303 100644 (file)
@@ -727,7 +727,7 @@ static int read_one_header_line(struct strbuf *line, FILE *in)
        struct strbuf continuation = STRBUF_INIT;
 
        /* Get the first part of the line. */
-       if (strbuf_getline(line, in, '\n'))
+       if (strbuf_getline_lf(line, in))
                return 0;
 
        /*
@@ -751,7 +751,7 @@ static int read_one_header_line(struct strbuf *line, FILE *in)
                peek = fgetc(in); ungetc(peek, in);
                if (peek != ' ' && peek != '\t')
                        break;
-               if (strbuf_getline(&continuation, in, '\n'))
+               if (strbuf_getline_lf(&continuation, in))
                        break;
                continuation.buf[0] = ' ';
                strbuf_rtrim(&continuation);
@@ -764,7 +764,7 @@ static int read_one_header_line(struct strbuf *line, FILE *in)
 
 static int find_boundary(struct mailinfo *mi, struct strbuf *line)
 {
-       while (!strbuf_getline(line, mi->input, '\n')) {
+       while (!strbuf_getline_lf(line, mi->input)) {
                if (*(mi->content_top) && is_multipart_boundary(mi, line))
                        return 1;
        }
@@ -815,7 +815,7 @@ again:
 
        strbuf_release(&newline);
        /* replenish line */
-       if (strbuf_getline(line, mi->input, '\n'))
+       if (strbuf_getline_lf(line, mi->input))
                return 0;
        strbuf_addch(line, '\n');
        return 1;
@@ -1004,7 +1004,7 @@ void setup_mailinfo(struct mailinfo *mi)
        mi->header_stage = 1;
        mi->use_inbody_headers = 1;
        mi->content_top = mi->content;
-       git_config(git_mailinfo_config, &mi);
+       git_config(git_mailinfo_config, mi);
 }
 
 void clear_mailinfo(struct mailinfo *mi)