Re: [PATCH] Documentation: mention that `eol` can change the dirty status of paths
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- Aug 24, 2017, 05:50 UTC
- Message-ID
- <20170824055054.GA32617@tor.lan>
- In-Reply-To
- <20170823211741.9633-1-mathstuf@gmail.com>
On Wed, Aug 23, 2017 at 05:17:41PM -0400, Ben Boeckel wrote:
Show 24 quoted lines
> 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.