git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 0/2] Improvements to tests and docs for .gitattributes eol

From
Johannes Sixt <j6t@kdbg.org>
Date
Feb 15, 2022, 07:05 UTC
Message-ID
<9ab7761a-ff63-f809-47af-033825e5779e@kdbg.org>
In-Reply-To
<xmqq8rud0ytj.fsf@gitster.g>
Am 15.02.22 um 01:15 schrieb Junio C Hamano:
Show 41 quoted lines
> Torsten Bögershausen <tboegi@web.de> writes:
> 
>>> ---- >8 -----
>>> From: brian m. carlson <sandals@crustytoothpaste.net>
>>> Subject: doc: clarify interaction between 'eol' and text=auto
>>>
>>> The `eol` takes effect on text files only when the index has the
>>> contents in LF line endings.  Paths with contents in CRLF line
>>> endings in the index may become dirty unless text=auto.
>>
>> That is a nice, precise and short summary here in the commit message
>> as well as the patch further down.
> 
> Thanks.  Then let's queue it for 'next' and merge it down.
> 
>>>
>>> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
>>> Signed-off-by: Junio C Hamano <gitster@pobox.com>
>>> ---
>>>  Documentation/gitattributes.txt | 11 ++++++-----
>>>  1 file changed, 6 insertions(+), 5 deletions(-)
>>>
>>> diff --git c/Documentation/gitattributes.txt w/Documentation/gitattributes.txt
>>> index 60984a4682..a71dad2674 100644
>>> --- c/Documentation/gitattributes.txt
>>> +++ w/Documentation/gitattributes.txt
>>> @@ -161,11 +161,12 @@ unspecified.
>>>
>>>  This attribute sets a specific line-ending style to be used in the
>>>  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.
>>> +attribute is set or unspecified, or if it is set to `auto`, the file is
>>> +detected as text, and it is stored with LF endings in the index.  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. Adding the path to the index again will normalize
>>> +the line endings in the index.

Sorry, I don't find this description clear at all due to the many 'or's and 'and's and no indication which parts belong together. The original text was clear (but, of course, not helpful if it was wrong).

I suggest to rewrite the paragraph into format with bullet points:
   ... only if one of the following is true:
  - is set and foo or bar
  - is unspecified and either
      - this
      - or that
  - is set to auto but not...

or something along the lines. I can't propose actual text because I have no clue what the truth is.

-- Hannes
Previous: Junio C HamanoNext: brian m. carlson
Message 14 of 24 in “Improvements to tests and docs for .gitattributes eol”
  1. 0/2 Improvements to tests and docs for .gitattributes eolbrian m. carlson, Jan 11, 2022
  2. 1/2 t0027: add tests for eol without text in .gitattributesbrian m. carlson, Jan 11, 2022
  3. 2/2 docs: correct documentation about eol attributebrian m. carlson, Jan 11, 2022
  4. Torsten B��gershausenJan 11, 2022
  5. brian m. carlsonJan 11, 2022
  6. Torsten B��gershausenJan 12, 2022
  7. 0/2 Improvements to tests and docs for .gitattributes eolbrian m. carlson, Feb 14, 2022
  8. 2/2 docs: correct documentation about eol attributebrian m. carlson, Feb 14, 2022
  9. 1/2 t0027: add tests for eol without text in .gitattributesbrian m. carlson, Feb 14, 2022
  10. Derrick StoleeFeb 14, 2022
  11. Junio C HamanoFeb 14, 2022
  12. Torsten B��gershausenFeb 14, 2022
  13. Junio C HamanoFeb 15, 2022
  14. Johannes SixtFeb 15, 2022
  15. brian m. carlsonFeb 15, 2022
  16. Johannes SixtFeb 16, 2022
  17. brian m. carlsonFeb 16, 2022
  18. Torsten B��gershausenFeb 16, 2022
  19. .gitattributes: include `text` attribute for eol attributesPhilip Oakley, Feb 3, 2023
  20. Ævar Arnfjörð BjarmasonFeb 3, 2023
  21. Philip OakleyFeb 3, 2023
  22. Torsten BögershausenFeb 4, 2023
  23. Junio C HamanoFeb 6, 2023
  24. Johannes SixtFeb 16, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.