From: "Torsten Bögershausen" <tboegi@web.de>
To: Ben Boeckel <mathstuf@gmail.com>
Cc: gitster@pobox.com, git@vger.kernel.org
Subject: Re: [PATCH] Documentation: mention that `eol` can change the dirty status of paths
Date: Thu, 24 Aug 2017 07:50:54 +0200 [thread overview]
Message-ID: <20170824055054.GA32617@tor.lan> (raw)
In-Reply-To: <20170823211741.9633-1-mathstuf@gmail.com>
On Wed, Aug 23, 2017 at 05:17:41PM -0400, Ben Boeckel wrote:
> When setting the `eol` attribute, paths can change their dirty status
> without any change in the working directory. This can cause confusion
> and should at least be mentioned with a remedy.
>
> Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
> ---
> Documentation/gitattributes.txt | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
> index c4f2be2..3044b71 100644
> --- a/Documentation/gitattributes.txt
> +++ b/Documentation/gitattributes.txt
> @@ -151,7 +151,11 @@ 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.
> +content checks, effectively setting the `text` attribute. Note that
> +setting this attribute on paths which are in the index with different
> +line endings than the attribute indicates the paths to be considered
> +dirty. Adding the path to the index again will normalize the line
> +endings in the index.
>
There is one minor comment:
The problem is when files had been commited with CRLF (regardless what your
eol= attribute says)
How about something like this :
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.
+content checks, effectively setting the `text` attribute. Note that
+setting this attribute on paths which are in the index with CRLF
+line endings makes the paths to be considered dirty.
+Adding the path to the index again will normalize the line
+endings in the index.
next prev parent reply other threads:[~2017-08-24 5:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 17:49 Cannot checkout after setting the eol attribute Ben Boeckel
2017-08-22 19:13 ` Torsten Bögershausen
2017-08-22 19:44 ` Ben Boeckel
2017-08-23 19:43 ` Torsten Bögershausen
2017-08-23 21:09 ` Ben Boeckel
2017-08-22 20:03 ` Junio C Hamano
2017-08-23 21:17 ` [PATCH] Documentation: mention that `eol` can change the dirty status of paths Ben Boeckel
2017-08-23 21:21 ` Ben Boeckel
2017-08-24 5:50 ` Torsten Bögershausen [this message]
2017-08-30 13:49 ` Ben Boeckel
2017-08-30 21:31 ` Junio C Hamano
2017-08-31 13:16 ` Ben Boeckel
2017-08-30 13:59 ` [PATCH v2] " Ben Boeckel
2017-08-31 13:19 ` [PATCH v3] " Ben Boeckel
2017-08-31 14:33 ` Torsten Bögershausen
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170824055054.GA32617@tor.lan \
--to=tboegi@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mathstuf@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).