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);
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);
insert_one_record(log, author.buf, oneline.len ? oneline.buf : "<none>");
-out:
strbuf_release(&author);
strbuf_release(&oneline);
}