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

Re: 'eol' documentation confusion

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 22, 2015, 16:11 UTC
Message-ID
<xmqqr3p3iuyc.fsf@gitster.dls.corp.google.com>
In-Reply-To
<5587AAB2.80305@web.de>
Torsten Bögershausen <tboegi@web.de> writes:
Show 5 quoted lines
> eol=lf or eol=crlf are the only useful settings.
> Everything else is ignored because it does not make sense.
>
> See convert.c:
> static enum eol git_path_check_eol()
That makes me wonder...

The original reasoning behind the current behaviour that we ignore unknown values given to configuration variables and attributes is so that people can use the same file that has values that are understood by newer versions of Git with older versions of Git.

You may be trying the eol=cleverLF setting introduced in Git version 47-prerelease by adding it to .git/info/attributes, and may have found it useful. But you may also have to use the same repository on another machine that you didn't install that future version of Git over the network filesystem. Barfing and not proceeding when we see unknown eol=cleverLF does not sound like a nice thing to do, which is why we just ignore and behave as if the setting was not there.

Ideally, however, I think we should ignore an unknown setting as long as it does not matter (i.e. we do not come to the codepath that wants to know eol settings for the path, e.g. running "git log" to show only the commit log messages and the topology of the history), but we should error out when the unknown setting possibly matters (i.e. we do need the eol setting for the path in order to correctly convert the contents to end-user's liking).

Thoughts (and patches ;-)?
Previous: Torsten BögershausenNext: Torsten Bögershausen
Message 4 of 5 in “'eol' documentation confusion”
  1. Robert DaileyJun 21, 2015
  2. Robert DaileyJun 21, 2015
  3. Torsten BögershausenJun 22, 2015
  4. Junio C HamanoJun 22, 2015
  5. Torsten BögershausenJun 25, 2015

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.