public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: "Torsten Bögershausen" <tboegi@web•de>
Cc: git@vger•kernel.org
Subject: Re: [PATCH v7] ls-files: Add eol diagnostics
Date: Tue, 22 Dec 2015 15:35:31 -0800	[thread overview]
Message-ID: <xmqq37uucb0c.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <B82763FE-0B35-4474-9956-B4B52DF6602C@web.de> ("Torsten Bögershausen"'s message of "Tue, 22 Dec 2015 12:45:33 +0100")

Torsten Bögershausen <tboegi@web•de> writes:

> When working in a cross-platform environment, a user wants to
> check if text files are stored normalized in the repository and if
> .gitattributes are set appropriately.
>
> Make it possible to let Git show the line endings in the index and
> in the working tree and the effective text/eol attributes.
>
> The end of line ("eolinfo") are shown like this:
> "binary"       binary file
> "text-no-eol"  text file without any EOL
> "text-lf"      text file with LF
> "text-crlf"    text file with CRLF
> "text-crlf-lf" text file with mixed line endings.
>
> The effective text/eol attribute is one of these:
> "", "-text", "text", "text=auto", "eol=lf", "eol=crlf"
>
> git ls-files --eol gives an output like this:
>
> i/text-no-eol   w/text-no-eol   attr/text=auto t/t5100/empty
> i/binary        w/binary        attr/-text     t/test-binary-2.png
> i/text-lf       w/text-lf       attr/eol=lf    t/t5100/rfc2047-info-0007
> i/text-lf       w/text-crlf     attr/eol=crlf  doit.bat
> i/text-crlf-lf  w/text-crlf-lf  attr/          locale/XX.po
>
> Note that the output is meant to be human-readable and may change.

Wait, what?  

I've been assuming that these output being designed was to be read
by machine, because this new feature is implemented as a part of the
command "ls-files", which is plumbing whose output is meant for
script consumption.

> +--eol::
> +	Show line endings ("eolinfo") and the text/eol attributes ("texteolattr") of files.
> +	"eolinfo" is the file content identification used by Git when
> +	the "text" attribute is "auto", or core.autocrlf != false.
> +
> +	"eolinfo" is either "" (when the the info is not available"), or one of "binary",
> +	"text-no-eol", "text-lf", "text-crlf" or "text-crlf-lf".
> +	The "texteolattr" can be "", "-text", "text", "text=auto", "eol=lf", "eol=crlf".
> +
> +	Both the content in the index ("i/") and the content in the working tree ("w/")
> +	are shown for regular files, followed by the "texteolattr ("attr/").
> +

Does this format well, or would the second and third paragraph be
format in a funny way?

  reply	other threads:[~2015-12-22 23:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-22 11:45 [PATCH v7] ls-files: Add eol diagnostics Torsten Bögershausen
2015-12-22 23:35 ` Junio C Hamano [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-12-07 17:09 Torsten Bögershausen
2015-12-07 20:12 ` Philip Oakley
2015-12-07 20:21 ` 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=xmqq37uucb0c.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=tboegi@web$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox