Merge branch 'da/user-useconfigonly'
[gitweb.git] / builtin / shortlog.c
index adbf1fd99150a1e18dd1d2ad142279c455b5cc80..bfc082e58467953c1e4c96fd27a884abea4f5127 100644 (file)
@@ -118,15 +118,15 @@ static void read_from_stdin(struct shortlog *log)
        struct strbuf author = STRBUF_INIT;
        struct strbuf oneline = STRBUF_INIT;
 
-       while (strbuf_getline(&author, stdin, '\n') != EOF) {
+       while (strbuf_getline_lf(&author, stdin) != EOF) {
                const char *v;
                if (!skip_prefix(author.buf, "Author: ", &v) &&
                    !skip_prefix(author.buf, "author ", &v))
                        continue;
-               while (strbuf_getline(&oneline, stdin, '\n') != EOF &&
+               while (strbuf_getline_lf(&oneline, stdin) != EOF &&
                       oneline.len)
                        ; /* discard headers */
-               while (strbuf_getline(&oneline, stdin, '\n') != EOF &&
+               while (strbuf_getline_lf(&oneline, stdin) != EOF &&
                       !oneline.len)
                        ; /* discard blanks */
                insert_one_record(log, v, oneline.buf);
@@ -149,13 +149,6 @@ void shortlog_add_commit(struct shortlog *log, struct commit *commit)
        ctx.output_encoding = get_log_output_encoding();
 
        format_commit_message(commit, "%an <%ae>", &author, &ctx);
-       /* we can detect a total failure only by seeing " <>" in the output */
-       if (author.len <= 3) {
-               warning(_("Missing author: %s"),
-                   oid_to_hex(&commit->object.oid));
-               goto out;
-       }
-
        if (!log->summary) {
                if (log->user_format)
                        pretty_print_commit(&ctx, commit, &oneline);
@@ -165,7 +158,6 @@ void shortlog_add_commit(struct shortlog *log, struct commit *commit)
 
        insert_one_record(log, author.buf, oneline.len ? oneline.buf : "<none>");
 
-out:
        strbuf_release(&author);
        strbuf_release(&oneline);
 }