From: "Torsten Bögershausen" <tboegi@web.de>
To: "Sebastian Schuberth" <sschuberth@gmail.com>,
"Torsten Bögershausen" <tboegi@web.de>,
git@vger.kernel.org
Subject: Re: [PATCH v3] ls-files: Add eol diagnostics
Date: Mon, 23 Nov 2015 18:05:18 +0100 [thread overview]
Message-ID: <5653474E.6050909@web.de> (raw)
In-Reply-To: <56517AD5.6040909@gmail.com>
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
And if there is no separator, it is harder to make it machine-parsable,
if we e.g. extend the attributes to support "*text=autocrlf", or "*.text=autoinput"
(But that is another story)
If we replace "/[-a-z]" with "\t", the line has always a separator,
but needs a somewhat wider screen:
text-lf text-lf zlib.c
>> + echo huh $1
[] good catch, thanks
next prev parent reply other threads:[~2015-11-23 17:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-21 7:36 [PATCH v3] ls-files: Add eol diagnostics Torsten Bögershausen
2015-11-22 8:20 ` Sebastian Schuberth
2015-11-23 17:05 ` Torsten Bögershausen [this message]
2015-11-23 19:45 ` Sebastian Schuberth
2015-11-23 20:00 ` Eric Sunshine
2015-11-24 16:45 ` Ramsay Jones
2015-11-23 17:27 ` Eric Sunshine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5653474E.6050909@web.de \
--to=tboegi@web.de \
--cc=git@vger.kernel.org \
--cc=sschuberth@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.