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

Re: [PATCH v3 2/4] gitfaq: give advice on using eol attribute in gitattributes

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jul 4, 2024, 21:10 UTC
Message-ID
<ZocPrtrOVTqSeUTY@tapette.crustytoothpaste.net>
In-Reply-To
<xmqqcynt91fe.fsf@gitster.g>
On 2024-07-04 at 05:22:13, Junio C Hamano wrote:
Show 24 quoted lines
> "brian m. carlson" <sandals@crustytoothpaste.net> writes:
> > +With text files, Git will generally ensure that LF endings are used in the
> > +repository, and will honor `core.autocrlf` and `core.eol` to decide what options
> > +to use when checking files out.  You can also override this by specifying a
> > +particular line ending such as `eol=lf` or `eol=crlf` if those files must always
> 
> "this" being ... Not what gets stored in the object database but
> what is done to the working tree.
> 
> What is being "overridden" is that the earlier two mentioned here
> are configuration variables that apply to _all_ text files in
> general, and the attribute mechanism is a way to give settings that
> are more tailored for each path.  I think the reason I found the
> above a bit hard to understand when I read it for the first time was
> because it didn't "click" that this paragraph was about configuration
> giving the general default and attributes overriding it.  Perhaps...
> 
>     ... are used in the repository.  The `core.autocrlf` and
>     `core.eol` configuration variables specify what line-ending
>     convention is followed when any text file is checked out.  You
>     can also use the `eol` attribute (e.g., "eol=crlf") to override
>     which files get what line-ending treatment.
> 
> or something?
Sure, that sounds like a nice improvement.
> > +have that ending in the working tree (e.g., for functionality reasons).
> 
> I'd strike "(e.g., for functionality reasons)" out, as the next
> paragraph makes it sufficiently clear.
Sure, I can do that.
-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA
Previous: Junio C HamanoNext: brian m. carlson
Message 4 of 22 in “Additional FAQ entries”
  1. 0/4 Additional FAQ entriesbrian m. carlson, Jul 4, 2024
  2. 2/4 gitfaq: give advice on using eol attribute in gitattributesbrian m. carlson, Jul 4, 2024
  3. Junio C HamanoJul 4, 2024
  4. brian m. carlsonJul 4, 2024
  5. 3/4 gitfaq: add entry about syncing working treesbrian m. carlson, Jul 4, 2024
  6. Junio C HamanoJul 4, 2024
  7. brian m. carlsonJul 4, 2024
  8. Junio C HamanoJul 6, 2024
  9. 1/4 gitfaq: add documentation on proxiesbrian m. carlson, Jul 4, 2024
  10. 4/4 doc: mention that proxies must be completely transparentbrian m. carlson, Jul 4, 2024
  11. Junio C HamanoJul 4, 2024
  12. Junio C HamanoJul 4, 2024
  13. brian m. carlsonJul 4, 2024
  14. Junio C HamanoJul 6, 2024
  15. brian m. carlsonJul 8, 2024
  16. Jeff KingJul 6, 2024
  17. Junio C HamanoJul 6, 2024
  18. 0/4 Additional FAQ entriesbrian m. carlson, Jul 9, 2024
  19. 1/4 gitfaq: add documentation on proxiesbrian m. carlson, Jul 9, 2024
  20. 3/4 gitfaq: add entry about syncing working treesbrian m. carlson, Jul 9, 2024
  21. 4/4 doc: mention that proxies must be completely transparentbrian m. carlson, Jul 9, 2024
  22. 2/4 gitfaq: give advice on using eol attribute in gitattributesbrian m. carlson, Jul 9, 2024

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.