All of lore.kernel.org
 help / color / mirror / Atom feed
From: Torsten =?unknown-8bit?Q?B=C3=B6gershausen?= <tboegi@web.de>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 2/2] docs: correct documentation about eol attribute
Date: Tue, 11 Jan 2022 19:30:03 +0100	[thread overview]
Message-ID: <20220111183003.g4fch5d2f47it2hg@tb-raspi4> (raw)
In-Reply-To: <20220111021507.531736-3-sandals@crustytoothpaste.net>

Hej Brian,
thanks for digging into this.

Could you be so kind to send the stackoverflow issue ?
(You can send it to me only)

I have some comments/questions, out of my head.

On Tue, Jan 11, 2022 at 02:15:07AM +0000, brian m. carlson wrote:
> The documentation for the eol attribute states that it is "effectively
> setting the text attribute".
> Let's avoid confusing users (and the present author when trying to
> describe Git's behavior to others) by clearly documenting in which
> cases the "eol" attribute has effect.
>
> Specifically, the attribute always has an effect unless the file is
> explicitly set as -text, or the file is set as text=auto and the file is
> detected as binary.
>
> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
> ---
>  Documentation/gitattributes.txt | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
> index 83fd4e19a4..60984a4682 100644
> --- a/Documentation/gitattributes.txt
> +++ b/Documentation/gitattributes.txt
> @@ -160,11 +160,12 @@ unspecified.
>  ^^^^^
>
>  This attribute sets a specific line-ending style to be used in the
> -working directory.  It enables end-of-line conversion without any
> -content checks, effectively setting the `text` attribute.  Note that
> -setting this attribute on paths which are in the index with CRLF line
> -endings may make the paths to be considered dirty.  Adding the path to
> -the index again will normalize the line endings in the index.
> +working directory.  This attribute has effect only if the `text`
> +attribute is set or unspecified, or if it is set to `auto` and the file
> +is detected as text.



>  Note that setting this attribute on paths which
> +are in the index with CRLF line endings may make the paths to be
> +considered dirty. Adding the path to the index again will normalize the
> +line endings in the index.

I think that this can be loosened as well. And, beside this, the "dirty"
warning about setting attributes could be written as part of the "text"
attribute as well. I dunno. Here is a possible suggestion:


  Note that setting this attribute on paths which are in the index with CRLF
  line endings may make the paths to be considered dirty - unless "text=auto"
  is set. `git ls-files --eol` can be used to check the "line ending status".
  Adding the path to the index again will normalize the line endings in the index.

>
>  Set to string value "crlf"::
>

  reply	other threads:[~2022-01-11 18:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11  2:15 [PATCH 0/2] Improvements to tests and docs for .gitattributes eol brian m. carlson
2022-01-11  2:15 ` [PATCH 1/2] t0027: add tests for eol without text in .gitattributes brian m. carlson
2022-01-11  2:15 ` [PATCH 2/2] docs: correct documentation about eol attribute brian m. carlson
2022-01-11 18:30   ` Torsten =?unknown-8bit?Q?B=C3=B6gershausen?= [this message]
2022-01-11 22:40     ` brian m. carlson
2022-01-12 15:16       ` Torsten =?unknown-8bit?Q?B=C3=B6gershausen?=
2022-02-14  2:08 ` [PATCH v2 0/2] Improvements to tests and docs for .gitattributes eol brian m. carlson
2022-02-14  2:08   ` [PATCH v2 1/2] t0027: add tests for eol without text in .gitattributes brian m. carlson
2022-02-14  2:08   ` [PATCH v2 2/2] docs: correct documentation about eol attribute brian m. carlson
2022-02-14 14:52   ` [PATCH v2 0/2] Improvements to tests and docs for .gitattributes eol Derrick Stolee
2022-02-14 18:15   ` Junio C Hamano
2022-02-14 20:46     ` Torsten =?unknown-8bit?Q?B=C3=B6gershausen?=
2022-02-15  0:15       ` Junio C Hamano
2022-02-15  7:05         ` Johannes Sixt
2022-02-15 22:46           ` brian m. carlson
2022-02-16  7:00             ` Johannes Sixt
2022-02-16 10:28               ` brian m. carlson
2022-02-16 11:52                 ` Torsten =?unknown-8bit?Q?B=C3=B6gershausen?=
2023-02-03 12:59                   ` [PATCH] .gitattributes: include `text` attribute for eol attributes Philip Oakley
2023-02-03 13:40                     ` Ævar Arnfjörð Bjarmason
2023-02-03 16:43                       ` Philip Oakley
2023-02-04  8:03                     ` Torsten Bögershausen
2023-02-06 21:56                     ` Junio C Hamano
2022-02-16 19:02                 ` [PATCH v2 0/2] Improvements to tests and docs for .gitattributes eol Johannes Sixt

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=20220111183003.g4fch5d2f47it2hg@tb-raspi4 \
    --to=tboegi@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sandals@crustytoothpaste.net \
    /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.