summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-28 13:52:11 -0700
committerJunio C Hamano <gitster@pobox.com>2016-01-14 15:10:53 -0800
commitcfdd780a6341efadb462769130a97f4cebc15e94 (patch)
tree389e68b6c7b1dbfb1a97dd4443748f03ff70a543
parent851fdd5cc01f604a675992295da08bd2594236cf (diff)
downloadgit-cfdd780a6341efadb462769130a97f4cebc15e94.tar.gz
column: read lines with strbuf_getline()
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>
-rw-r--r--builtin/column.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/column.c b/builtin/column.c
index 40eab08594..33314b4d71 100644
--- a/builtin/column.c
+++ b/builtin/column.c
@@ -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);