OSDN Git Service

mktree: there are only two possible line terminations
authorJunio C Hamano <gitster@pobox.com>
Wed, 13 Jan 2016 23:55:12 +0000 (15:55 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 Jan 2016 18:12:58 +0000 (10:12 -0800)
commitb4df87b8ca3b9cf8e648058af4870cfc7305b082
tree33864eadfc53ca1975cab7b90f87b99bf52f444a
parent8f309aeb8225a9c26f20c0dbc031f1ea8df75d49
mktree: there are only two possible line terminations

The program by default reads LF terminated lines, with an option to
use NUL terminated records.  Instead of pretending that there can be
other useful values for line_termination, use a boolean variable,
nul_term_line, to tell if NUL terminated records are used, and
switch between strbuf_getline_{lf,nul} based on it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/mktree.c