On Wed, Jan 13, 2016 at 07:03:04PM -0800, Junio C Hamano wrote:
quoted hunk ↗ jump to hunk
@@ -141,23 +141,25 @@ int cmd_mktree(int ac, const char **av, const char *prefix)
{
struct strbuf sb = STRBUF_INIT;
unsigned char sha1[20];
- int line_termination = '\n';
+ int lf_lines = 1;
int allow_missing = 0;
int is_batch_mode = 0;
int got_eof = 0;
+ strbuf_getline_fn getline_fn;
const struct option option[] = {
- OPT_SET_INT('z', NULL, &line_termination, N_("input is NUL terminated"), '\0'),
+ OPT_SET_INT('z', NULL, &lf_lines, N_("input is NUL terminated"), '\0'),
Using '\0' isn't wrong here, but should it now just be "0", since it's
no longer meant to be a "char"?
Also, I notice that other patches in the series flip the logic (instead
of "lf_lines", we get its inverse, "nul_term_line"). That lets us use
the more obvious "OPT_BOOL" here.
-Peff