Skip to content

Commit

Permalink
column: read lines with strbuf_getline()
Browse files Browse the repository at this point in the history
Multiple lines read here are concatenated on a single line to form a
multi-column output line.  We do not want to have a CR at the end,
even if the input file consists of CRLF terminated lines.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Jan 15, 2016
1 parent b42ca3d commit 1536dd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/column.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int cmd_column(int argc, const char **argv, const char *prefix)
die(_("--command must be the first argument"));
}
finalize_colopts(&colopts, -1);
while (!strbuf_getline_lf(&sb, stdin))
while (!strbuf_getline(&sb, stdin))
string_list_append(&list, sb.buf);

print_columns(&list, colopts, &copts);
Expand Down

0 comments on commit 1536dd9

Please sign in to comment.