Re: [PATCH v10] ls-files: add eol diagnostics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Torsten Bögershausen <tboegi@xxxxxx> writes:

> On 01/11/2016 06:48 PM, Junio C Hamano wrote:
>
> Thanks for comments
>>> +		if (line_terminator == '\n')
>>> +			printf("i/%-6s w/%-6s attr/%-9s ", i_txt, w_txt, a_txt);
>> Can we do something better than these hard-coded constants?  Why
>> can't the "one HT between each" approach be used for both?
> v11 will make more clear, that currently "eol=crlf" is the same as
> "text eol=crlf".
> The shortest attr is then "", the longest "text eol=crlf".
> Using '\t' as a separator makes the output cluttered for a human reader.
>
> When parsing the output, the '\t' is much more convenient (and that's
> what t0027 wil use).
> Is there any chance to have a selection between human-friendly and
> script-friendly ?
> Would an option -e (eol info using spaces) vs --eol (eol info with
> TABs) make sence ?

I do not think so; what you have in v10 is infinitely better.

What I found disturbing the most was these hardcoded numbers 6,6,9
in the printf format.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]