From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: "Torsten Bögershausen" <tboegi@web.de>, git@vger.kernel.org
Subject: Re: [PATCH v8] ls-files: Add eol diagnostics
Date: Wed, 30 Dec 2015 14:22:44 +0000 [thread overview]
Message-ID: <5683E8B4.7040005@ramsayjones.plus.com> (raw)
In-Reply-To: <5683D49D.2010509@web.de>
On 30/12/15 12:57, Torsten Bögershausen wrote:
> 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
>
> Add test cases in t0027, thanks to Junio C Hamano for the optimized
> grep-less sed expression.
>
> Helped-By: Eric Sunshine <sunshine@sunshineco.com>
> Signed-off-by: Torsten Bögershausen <tboegi@web.de>
> ---
> Changes since v7:
> - Remove the "may change" from commit message.
> - Run make doc, improved git-ls-files.txt
> Documentation/git-ls-files.txt | 23 +++++++++
> builtin/ls-files.c | 19 +++++++
> convert.c | 85 +++++++++++++++++++++++++++++++
> convert.h | 3 ++
> t/t0027-auto-crlf.sh | 112 ++++++++++++++++++++++++++++++++++++-----
> 5 files changed, 230 insertions(+), 12 deletions(-)
>
> diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
> index e26f01f..13b0e1d 100644
> --- a/Documentation/git-ls-files.txt
> +++ b/Documentation/git-ls-files.txt
> @@ -12,6 +12,7 @@ SYNOPSIS
> 'git ls-files' [-z] [-t] [-v]
> (--[cached|deleted|others|ignored|stage|unmerged|killed|modified])*
> (-[c|d|o|i|s|u|k|m])*
> + [--eol]
> [-x <pattern>|--exclude=<pattern>]
> [-X <file>|--exclude-from=<file>]
> [--exclude-per-directory=<file>]
> @@ -147,6 +148,19 @@ a space) at the start of each line:
> possible for manual inspection; the exact format may change at
> any time.
> +--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".
<bikeshedding>
Again, I think this list reads better as: binary, none, lf, crlf and mixed.
If you prefer to have 'text' in there somewhere, how about:
binary, text-none, text-lf, text-crlf, text-mixed.
:-D
(I promise not the mention it again!)
</bikeshedding>
ATB,
Ramsay Jones
next prev parent reply other threads:[~2015-12-30 14:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-30 12:57 [PATCH v8] ls-files: Add eol diagnostics Torsten Bögershausen
2015-12-30 14:22 ` Ramsay Jones [this message]
2015-12-30 15:27 ` Torsten Bögershausen
2015-12-30 21:45 ` Junio C Hamano
2015-12-30 21:43 ` Junio C Hamano
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=5683E8B4.7040005@ramsayjones.plus.com \
--to=ramsay@ramsayjones.plus.com \
--cc=git@vger.kernel.org \
--cc=tboegi@web.de \
/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.