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

Re: [PATCH v3] ls-files: Add eol diagnostics

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Nov 24, 2015, 16:45 UTC
Message-ID
<5654940E.90207@ramsayjones.plus.com>
In-Reply-To
<5653474E.6050909@web.de>
On 23/11/15 17:05, Torsten Bögershausen wrote:
Show 27 quoted lines
> On 22.11.15 09:20, Sebastian Schuberth wrote:
>> On 21.11.2015 08:36, Torsten Bögershausen wrote:
>>
>>> git ls-files --eol gives an output like this:
>>>
>>> i/text-no-eol   w/text-no-eol   attr/text=auto t/t5100/empty
>>
>> I'm sorry if this has been discussed before, but hav you considered to use a header line and omit the prefixed from the columns instead? Like
>>
>> index         working tree     attributes    file
>>
>> binary        binary           -text         t/test-binary-2.png
>> text-lf       text-lf          eol=lf        t/t5100/rfc2047-info-0007
>> text-lf       text-crlf        eol=crlf      doit.bat
>> text-crlf-lf  text-crlf-lf                   locale/XX.po
>>
>> I believe this would be both easier to read for humans, and easier to parse for scripts that e.g. want to compare line endings in the index and working tree.
>>
> The problem I see is to make sure that there is always a separator, even when a field empty:
> 
> rm zlib.c; git ls-file --eol #will include a line like this:
> i/text-lf       w/              attr/          zlib.c
> 
> or, as another example:
> git ls-files -o --eol
> i/              w/binary        attr/          zlib.o
> 

[I have been trying *not* to respond to this thread, since the following comment is classic bikeshedding on the naming of things and I am, in general, hopeless at naming things ... :-D ]

<bikeshedding> I don't think you need to include 'text' in the name of the line ending descriptors - if its not binary then its some form of text. So, maybe something like:

    binary
    none
    lf
    crlf
    mixed
</bikeshedding>
HTH

ATB, Ramsay Jones

Previous: Eric SunshineNext: Eric Sunshine
Message 6 of 7 in “ls-files: Add eol diagnostics”
  1. ls-files: Add eol diagnosticsTorsten Bögershausen, Nov 21, 2015
  2. Sebastian SchuberthNov 22, 2015
  3. Torsten BögershausenNov 23, 2015
  4. Sebastian SchuberthNov 23, 2015
  5. Eric SunshineNov 23, 2015
  6. Ramsay JonesNov 24, 2015
  7. Eric SunshineNov 23, 2015

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.