git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Torsten Bögershausen <tboegi@web.de>
Date
Jan 12, 2016, 06:25 UTC
Message-ID
<56949C53.5030605@web.de>
In-Reply-To
<xmqq8u3wxb0i.fsf@gitster.mtv.corp.google.com>
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 ?

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “ls-files: add eol diagnostics”
  1. ls-files: add eol diagnosticstboegi@web.de, Jan 10, 2016
  2. Junio C HamanoJan 11, 2016
  3. Torsten BögershausenJan 12, 2016
  4. Junio C HamanoJan 12, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.