{"thread":{"id":"50335","subject":"unclear docs","startedAt":"2019-01-27T10:05:09Z","lastAt":"2019-01-29T12:41:15Z","messageCount":16,"participants":["Sergey Lukashev","Jeff King","Torsten Bögershausen","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"367749","messageId":"57362151548583138@iva8-37fc2ad204cd.qloud-c.yandex.net","threadId":"50335","inReplyTo":null,"subject":"unclear docs","fromName":"Sergey Lukashev","fromEmail":"lukashev.s@ya.ru","sentAt":"2019-01-27T09:58:58Z","receivedAt":"2019-01-27T10:05:09Z","isPatch":false,"sender":{"key":"lukashev.s@ya.ru","avatar":null},"body":"Hello!\n\nCould somebody please explain what 'core.autocrlf overrides core.eol' means given that we have the following statement in core.eol docs:\n\"Sets the line ending type to use in the working directory for files that have the text property set when core.autocrlf is false\".\n\nI would like to know which line endings I'm supposed to get in the working tree if I have core.autocrlf=false and '* text=auto' in .gitattributes on windows. I get CRLFs  which is consistent with the last quote but I don't understand what 'core.autocrlf overrides core.eol' means in this case.\n\nLinks:\nhttps://git-scm.com/docs/git-config#git-config-coreeol\nhttps://git-scm.com/docs/gitattributes#_checking_out_and_checking_in\n\n\n"},{"id":"367750","messageId":"13169311548590123@iva1-16f33c6a446b.qloud-c.yandex.net","threadId":"50335","inReplyTo":"57362151548583138@iva8-37fc2ad204cd.qloud-c.yandex.net","subject":"Re: unclear docs","fromName":"Sergey Lukashev","fromEmail":"lukashev.s@ya.ru","sentAt":"2019-01-27T11:55:23Z","receivedAt":"2019-01-27T11:57:11Z","isPatch":false,"sender":{"key":"lukashev.s@ya.ru","avatar":null},"body":"A follow up on my previous mail.\n\nWell, I have two problems:\n1) The endings I get with core.autocrlf=false depend on whether I have * text=auto (a file was commited with LFs). At least in git 2.20.1\n2) If the quote holds true then autocrlf=false is actually \"true\" (for output conversion) on Windows by default because default core.eol is 'native', which is CRLF. I believe autocrlf=false is supposed to mean \"no any conversion, input or output, read or write the repo as is\".\n\n27.01.2019, 13:05, \"Sergey Lukashev\" <lukashev.s@ya.ru>:\n> Hello!\n>\n> Could somebody please explain what 'core.autocrlf overrides core.eol' means given that we have the following statement in core.eol docs:\n> \"Sets the line ending type to use in the working directory for files that have the text property set when core.autocrlf is false\".\n>\n> I would like to know which line endings I'm supposed to get in the working tree if I have core.autocrlf=false and '* text=auto' in .gitattributes on windows. I get CRLFs which is consistent with the last quote but I don't understand what 'core.autocrlf overrides core.eol' means in this case.\n>\n> Links:\n> https://git-scm.com/docs/git-config#git-config-coreeol\n> https://git-scm.com/docs/gitattributes#_checking_out_and_checking_in\n"},{"id":"367839","messageId":"20190128160944.GB23588@sigill.intra.peff.net","threadId":"50335","inReplyTo":"13169311548590123@iva1-16f33c6a446b.qloud-c.yandex.net","subject":"Re: unclear docs","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-28T16:09:44Z","receivedAt":"2019-01-28T17:11:26Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Jan 27, 2019 at 02:55:23PM +0300, Sergey Lukashev wrote:\n\n> Well, I have two problems:\n> 1) The endings I get with core.autocrlf=false depend on whether I have\n>    * text=auto (a file was commited with LFs). At least in git 2.20.1\n\nThat sounds right. The default is that Git will never touch your line\nendings (going into or out of the working tree). Turning on the\n\"text=auto\" attribute for everything will tell it to start doing so\n(according to core.eol, which on Windows is CRLF).\n\n> 2) If the quote holds true then autocrlf=false is actually \"true\" (for\n>    output conversion) on Windows by default because default core.eol\n>    is 'native', which is CRLF. I believe autocrlf=false is supposed to\n>    mean \"no any conversion, input or output, read or write the repo as\n>    is\".\n\nNo, it only means \"do not use the autocrlf feature\". If you've\nseparately configured text attributes, it does not disable them.\n\n-Peff\n"},{"id":"367840","messageId":"20190128160620.GA23588@sigill.intra.peff.net","threadId":"50335","inReplyTo":"57362151548583138@iva8-37fc2ad204cd.qloud-c.yandex.net","subject":"Re: unclear docs","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-28T16:06:20Z","receivedAt":"2019-01-28T17:16:35Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Jan 27, 2019 at 12:58:58PM +0300, Sergey Lukashev wrote:\n\n> Could somebody please explain what 'core.autocrlf overrides core.eol'\n> means given that we have the following statement in core.eol docs:\n> \"Sets the line ending type to use in the working directory for files\n> that have the text property set when core.autocrlf is false\".\n> \n> I would like to know which line endings I'm supposed to get in the\n> working tree if I have core.autocrlf=false and '* text=auto' in\n> .gitattributes on windows. I get CRLFs  which is consistent with the\n> last quote but I don't understand what 'core.autocrlf overrides\n> core.eol' means in this case.\n\nI think it means:\n\n  - if core.autocrlf is false (the default), then the text attribute and\n    core.eol are used\n\n  - if core.autocrlf is true, then that overrides the whole\n    attribute/eol system\n\nThis unfortunate complexity is due to historical reasons (the\nmuch-simpler autocrlf came first, and we had to maintain compatibility\nwith it). I agree the wording in the documentation is pretty vague.\n\nPerhaps the patch below makes it more clear (I similarly looked at the\ndefinitions of core.autocrlf and core.eol, but they make the distinction\nthat autocrlf only matters when \"true\").\n\n-- >8 --\nSubject: [PATCH] doc/gitattributes: clarify \"autocrlf overrides eol\"\n\nWe only override core.eol with core.autocrlf when the latter is set to\n\"true\" (otherwise, core.eol would never do anything!). Let's make this\nmore clear, and point the reader to the git-config definitions, which\ndiscuss this in more detail.\n\nNoticed-by: Sergey Lukashev <lukashev.s@ya.ru>\nSigned-off-by: Jeff King <peff@peff.net>\n---\n Documentation/gitattributes.txt | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt\nindex b8392fc330..0ce8740e44 100644\n--- a/Documentation/gitattributes.txt\n+++ b/Documentation/gitattributes.txt\n@@ -124,7 +124,8 @@ text file is normalized, its line endings are converted to LF in the\n repository.  To control what line ending style is used in the working\n directory, use the `eol` attribute for a single file and the\n `core.eol` configuration variable for all text files.\n-Note that `core.autocrlf` overrides `core.eol`\n+Note that setting `core.autocrlf` to `true` overrides `core.eol` (see\n+the definitions of those options in linkgit:git-config[1]).\n \n Set::\n \n-- \n2.20.1.845.g57b86ca485\n\n"},{"id":"367845","messageId":"20190128173142.5v6varper55t3apk@tb-raspi4","threadId":"50335","inReplyTo":"13169311548590123@iva1-16f33c6a446b.qloud-c.yandex.net","subject":"Re: unclear docs","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2019-01-28T17:31:42Z","receivedAt":"2019-01-28T17:31:47Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Sun, Jan 27, 2019 at 02:55:23PM +0300, Sergey Lukashev wrote:\n> A follow up on my previous mail.\n>\n> Well, I have two problems:\n> 1) The endings I get with core.autocrlf=false depend on whether I have * text=auto (a file was commited with LFs). At least in git 2.20.1\n> 2) If the quote holds true then autocrlf=false is actually \"true\" (for output conversion) on Windows by default because default core.eol is 'native', which is CRLF. I believe autocrlf=false is supposed to mean \"no any conversion, input or output, read or write the repo as is\".\n>\n> 27.01.2019, 13:05, \"Sergey Lukashev\" <lukashev.s@ya.ru>:\n> > Hello!\n> >\n> > Could somebody please explain what 'core.autocrlf overrides core.eol' means given that we have the following statement in core.eol docs:\n> > \"Sets the line ending type to use in the working directory for files that have the text property set when core.autocrlf is false\".\n> >\n> > I would like to know which line endings I'm supposed to get in the working tree if I have core.autocrlf=false and '* text=auto' in .gitattributes on windows. I get CRLFs which is consistent with the last quote but I don't understand what 'core.autocrlf overrides core.eol' means in this case.\n> >\n> > Links:\n> > https://git-scm.com/docs/git-config#git-config-coreeol\n> > https://git-scm.com/docs/gitattributes#_checking_out_and_checking_in\n\nGiven your .gitattributes file, you will get:\n\ncore.autocrlf=false core.eol=CRLF    gives CRLF\ncore.autocrlf=false core.eol=LF      gives LF\ncore.autocrlf=false core.eol=native  gives CRLF under Windows, LF everywhere else\ncore.autocrlf=true                   gives CRLF (regardless of core.eol)\n\nDoes this help ?\n\n\n\n\n"},{"id":"367849","messageId":"1593541548699120@myt6-27270b78ac4f.qloud-c.yandex.net","threadId":"50335","inReplyTo":"20190128160944.GB23588@sigill.intra.peff.net","subject":"Re: unclear docs","fromName":"Sergey Lukashev","fromEmail":"lukashev.s@ya.ru","sentAt":"2019-01-28T18:12:00Z","receivedAt":"2019-01-28T18:18:24Z","isPatch":false,"sender":{"key":"lukashev.s@ya.ru","avatar":null},"body":"Thank you. Does the paragraph about core.eol refers to the text attribute? It's written 'property' there. I was thinking it means whether git thinks file is text, using .gitattributes OR otherwise. Maybe changing this word will make it clearer?\n\n28.01.2019, 19:09, \"Jeff King\" <peff@peff.net>:\n> On Sun, Jan 27, 2019 at 02:55:23PM +0300, Sergey Lukashev wrote:\n>\n>>  Well, I have two problems:\n>>  1) The endings I get with core.autocrlf=false depend on whether I have\n>>     * text=auto (a file was commited with LFs). At least in git 2.20.1\n>\n> That sounds right. The default is that Git will never touch your line\n> endings (going into or out of the working tree). Turning on the\n> \"text=auto\" attribute for everything will tell it to start doing so\n> (according to core.eol, which on Windows is CRLF).\n>\n>>  2) If the quote holds true then autocrlf=false is actually \"true\" (for\n>>     output conversion) on Windows by default because default core.eol\n>>     is 'native', which is CRLF. I believe autocrlf=false is supposed to\n>>     mean \"no any conversion, input or output, read or write the repo as\n>>     is\".\n>\n> No, it only means \"do not use the autocrlf feature\". If you've\n> separately configured text attributes, it does not disable them.\n>\n> -Peff\n\n"},{"id":"367854","messageId":"xmqqzhrkab3s.fsf@gitster-ct.c.googlers.com","threadId":"50335","inReplyTo":"20190128160620.GA23588@sigill.intra.peff.net","subject":"Re: unclear docs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-28T18:30:31Z","receivedAt":"2019-01-28T18:30:37Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> I think it means:\n>\n>   - if core.autocrlf is false (the default), then the text attribute and\n>     core.eol are used\n>\n>   - if core.autocrlf is true, then that overrides the whole\n>     attribute/eol system\n\nI think that matches my understanding.\n\n> Subject: [PATCH] doc/gitattributes: clarify \"autocrlf overrides eol\"\n>\n> We only override core.eol with core.autocrlf when the latter is set to\n> \"true\" (otherwise, core.eol would never do anything!). Let's make this\n\nI fail to understand what \"otherwise...\" wants to say.  When\ncore.autocrlf is not \"true\", core.eol would not do anything?\n\nBut I can understand what the patch text says and it matches my\nunderstanding of the overriding behaviour, so let's queue it.\n\nThanks.\n\n> more clear, and point the reader to the git-config definitions, which\n> discuss this in more detail.\n>\n> Noticed-by: Sergey Lukashev <lukashev.s@ya.ru>\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n>  Documentation/gitattributes.txt | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt\n> index b8392fc330..0ce8740e44 100644\n> --- a/Documentation/gitattributes.txt\n> +++ b/Documentation/gitattributes.txt\n> @@ -124,7 +124,8 @@ text file is normalized, its line endings are converted to LF in the\n>  repository.  To control what line ending style is used in the working\n>  directory, use the `eol` attribute for a single file and the\n>  `core.eol` configuration variable for all text files.\n> -Note that `core.autocrlf` overrides `core.eol`\n> +Note that setting `core.autocrlf` to `true` overrides `core.eol` (see\n> +the definitions of those options in linkgit:git-config[1]).\n>  \n>  Set::\n"},{"id":"367855","messageId":"20190128183117.GA13165@sigill.intra.peff.net","threadId":"50335","inReplyTo":"1593541548699120@myt6-27270b78ac4f.qloud-c.yandex.net","subject":"Re: unclear docs","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-28T18:31:17Z","receivedAt":"2019-01-28T18:31:22Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jan 28, 2019 at 09:12:00PM +0300, Sergey Lukashev wrote:\n\n> Thank you. Does the paragraph about core.eol refers to the text\n> attribute? It's written 'property' there. I was thinking it means\n> whether git thinks file is text, using .gitattributes OR otherwise.\n> Maybe changing this word will make it clearer?\n\nYeah, I think the word \"property\" is unnecessarily confusing. Here's\nanother patch (meant to go on top of the other).\n\n-- >8 --\nSubject: [PATCH] docs/config: clarify \"text property\" in core.eol\n\nThe word \"property\" is less clear than \"attribute\", which is used\nelsewhere in the (surprise!) gitattributes documentation. So let's use\nthat.\n\nWhile we're here, let's make the paragraph a little easier to read by\nde-emphasizing the \"when core.autocrlf is false\" bit. Putting it in the\nfirst sentence obscures the main content, and many readers won't care\nabout autocrlf (i.e., anyone who is just following the gitattributes(7)\nadvice, which mainly discusses \"text\" and \"core.eol\").\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n Documentation/config/core.txt | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config/core.txt b/Documentation/config/core.txt\nindex d0e6635fe0..69c73ffe30 100644\n--- a/Documentation/config/core.txt\n+++ b/Documentation/config/core.txt\n@@ -121,11 +121,12 @@ core.quotePath::\n \n core.eol::\n \tSets the line ending type to use in the working directory for\n-\tfiles that have the `text` property set when core.autocrlf is false.\n+\tfiles that have the `text` attribute.\n \tAlternatives are 'lf', 'crlf' and 'native', which uses the platform's\n \tnative line ending.  The default value is `native`.  See\n \tlinkgit:gitattributes[5] for more information on end-of-line\n-\tconversion.\n+\tconversion. Note that this value is ignored if `core.autocrlf`\n+\tis set to `true`.\n \n core.safecrlf::\n \tIf true, makes Git check if converting `CRLF` is reversible when\n-- \n2.20.1.845.g57b86ca485\n\n"},{"id":"367856","messageId":"20190128183253.GB13165@sigill.intra.peff.net","threadId":"50335","inReplyTo":"xmqqzhrkab3s.fsf@gitster-ct.c.googlers.com","subject":"Re: unclear docs","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-28T18:32:53Z","receivedAt":"2019-01-28T18:32:56Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jan 28, 2019 at 10:30:31AM -0800, Junio C Hamano wrote:\n\n> Jeff King <peff@peff.net> writes:\n> \n> > I think it means:\n> >\n> >   - if core.autocrlf is false (the default), then the text attribute and\n> >     core.eol are used\n> >\n> >   - if core.autocrlf is true, then that overrides the whole\n> >     attribute/eol system\n> \n> I think that matches my understanding.\n> \n> > Subject: [PATCH] doc/gitattributes: clarify \"autocrlf overrides eol\"\n> >\n> > We only override core.eol with core.autocrlf when the latter is set to\n> > \"true\" (otherwise, core.eol would never do anything!). Let's make this\n> \n> I fail to understand what \"otherwise...\" wants to say.  When\n> core.autocrlf is not \"true\", core.eol would not do anything?\n\nI meant that if core.autocrlf overrides core.eol also when it is not set\nto true, then there would be no way to use core.eol, because the former\nmust be either true or false.\n\nI suppose one could argue that it can be \"unset\", though.\n\n> But I can understand what the patch text says and it matches my\n> understanding of the overriding behaviour, so let's queue it.\n\nThanks. I just posted a follow-up patch elsewhere in the thread. I think\nit makes sense to do both.\n\n-Peff\n"},{"id":"367864","messageId":"1811741548706614@myt1-06117f29c1ea.qloud-c.yandex.net","threadId":"50335","inReplyTo":"20190128183253.GB13165@sigill.intra.peff.net","subject":"Re: unclear docs","fromName":"Sergey Lukashev","fromEmail":"lukashev.s@ya.ru","sentAt":"2019-01-28T20:16:54Z","receivedAt":"2019-01-28T20:16:58Z","isPatch":false,"sender":{"key":"lukashev.s@ya.ru","avatar":null},"body":"autocrlf can be \"input\" as well.\n\n28.01.2019, 21:32, \"Jeff King\" <peff@peff.net>:\n> On Mon, Jan 28, 2019 at 10:30:31AM -0800, Junio C Hamano wrote:\n>\n>>  Jeff King <peff@peff.net> writes:\n>>\n>>  > I think it means:\n>>  >\n>>  > - if core.autocrlf is false (the default), then the text attribute and\n>>  > core.eol are used\n>>  >\n>>  > - if core.autocrlf is true, then that overrides the whole\n>>  > attribute/eol system\n>>\n>>  I think that matches my understanding.\n>>\n>>  > Subject: [PATCH] doc/gitattributes: clarify \"autocrlf overrides eol\"\n>>  >\n>>  > We only override core.eol with core.autocrlf when the latter is set to\n>>  > \"true\" (otherwise, core.eol would never do anything!). Let's make this\n>>\n>>  I fail to understand what \"otherwise...\" wants to say. When\n>>  core.autocrlf is not \"true\", core.eol would not do anything?\n>\n> I meant that if core.autocrlf overrides core.eol also when it is not set\n> to true, then there would be no way to use core.eol, because the former\n> must be either true or false.\n>\n\n\n"},{"id":"367865","messageId":"20190128204621.GA15915@sigill.intra.peff.net","threadId":"50335","inReplyTo":"1811741548706614@myt1-06117f29c1ea.qloud-c.yandex.net","subject":"Re: unclear docs","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-28T20:46:21Z","receivedAt":"2019-01-28T20:46:24Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jan 28, 2019 at 11:16:54PM +0300, Sergey Lukashev wrote:\n\n> >>  > Subject: [PATCH] doc/gitattributes: clarify \"autocrlf overrides eol\"\n> >>  >\n> >>  > We only override core.eol with core.autocrlf when the latter is set to\n> >>  > \"true\" (otherwise, core.eol would never do anything!). Let's make this\n> >>\n> >>  I fail to understand what \"otherwise...\" wants to say. When\n> >>  core.autocrlf is not \"true\", core.eol would not do anything?\n> >\n> > I meant that if core.autocrlf overrides core.eol also when it is not set\n> > to true, then there would be no way to use core.eol, because the former\n> > must be either true or false.\n>\n> autocrlf can be \"input\" as well.\n\nAh, true. Should the documentation actually say \"if core.autocrlf is not\n'false'\" then? I _think_ so from my reading of the code, but it would be\nnice to have confirmation from somebody better versed in the line-ending\ncode than I am (+cc Torsten).\n\n-Peff\n"},{"id":"367935","messageId":"20190129073810.23op5qaibyj2amwq@tb-raspi4","threadId":"50335","inReplyTo":"20190128183117.GA13165@sigill.intra.peff.net","subject":"Re: unclear docs","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2019-01-29T07:38:10Z","receivedAt":"2019-01-29T07:38:24Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Mon, Jan 28, 2019 at 01:31:17PM -0500, Jeff King wrote:\n> On Mon, Jan 28, 2019 at 09:12:00PM +0300, Sergey Lukashev wrote:\n>\n> > Thank you. Does the paragraph about core.eol refers to the text\n> > attribute? It's written 'property' there. I was thinking it means\n> > whether git thinks file is text, using .gitattributes OR otherwise.\n> > Maybe changing this word will make it clearer?\n>\n> Yeah, I think the word \"property\" is unnecessarily confusing. Here's\n> another patch (meant to go on top of the other).\n\nThe property was originally meant to say:\n- Either the \"text\" attribute is set in .gitattributes\n  or\n- The \"text=auto\" attribute is set in .gitattributes and\n  Git auto-detects the file as text (and not as binary).\n\n\n\n>\n> -- >8 --\n> Subject: [PATCH] docs/config: clarify \"text property\" in core.eol\n>\n> The word \"property\" is less clear than \"attribute\", which is used\n> elsewhere in the (surprise!) gitattributes documentation. So let's use\n> that.\n>\n> While we're here, let's make the paragraph a little easier to read by\n> de-emphasizing the \"when core.autocrlf is false\" bit. Putting it in the\n> first sentence obscures the main content, and many readers won't care\n> about autocrlf (i.e., anyone who is just following the gitattributes(7)\n> advice, which mainly discusses \"text\" and \"core.eol\").\n>\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n>  Documentation/config/core.txt | 5 +++--\n>  1 file changed, 3 insertions(+), 2 deletions(-)\n>\n> diff --git a/Documentation/config/core.txt b/Documentation/config/core.txt\n> index d0e6635fe0..69c73ffe30 100644\n> --- a/Documentation/config/core.txt\n> +++ b/Documentation/config/core.txt\n> @@ -121,11 +121,12 @@ core.quotePath::\n>\n>  core.eol::\n>  \tSets the line ending type to use in the working directory for\n> -\tfiles that have the `text` property set when core.autocrlf is false.\n> +\tfiles that have the `text` attribute.\n>  \tAlternatives are 'lf', 'crlf' and 'native', which uses the platform's\n>  \tnative line ending.  The default value is `native`.  See\n>  \tlinkgit:gitattributes[5] for more information on end-of-line\n> -\tconversion.\n> +\tconversion. Note that this value is ignored if `core.autocrlf`\n> +\tis set to `true`.\n\nShould that be\n > +\tconversion. Note that this value is ignored if `core.autocrlf`\n > +\tis set to `true` or `input`.\n\nAs we look at convert.c:\n\nstatic int text_eol_is_crlf(void)\n{\n  if (auto_crlf == AUTO_CRLF_TRUE)\n    return 1;\n  else if (auto_crlf == AUTO_CRLF_INPUT)\n    return 0;\n  if (core_eol == EOL_CRLF)\n    return 1;\n  if (core_eol == EOL_UNSET && EOL_NATIVE == EOL_CRLF)\n    return 1;\n  return 0;\n}\n\n"},{"id":"367941","messageId":"577591548757706@myt1-4903e6646a45.qloud-c.yandex.net","threadId":"50335","inReplyTo":"20190129073810.23op5qaibyj2amwq@tb-raspi4","subject":"Re: unclear docs","fromName":"Sergey Lukashev","fromEmail":"lukashev.s@ya.ru","sentAt":"2019-01-29T10:28:26Z","receivedAt":"2019-01-29T10:35:54Z","isPatch":false,"sender":{"key":"lukashev.s@ya.ru","avatar":null},"body":"This is in fact how I got it but it seems to have changed since then.\n\n29.01.2019, 10:38, \"Torsten Bögershausen\" <tboegi@web.de>:\n>\n> The property was originally meant to say:\n> - Either the \"text\" attribute is set in .gitattributes\n>   or\n> - The \"text=auto\" attribute is set in .gitattributes and\n>   Git auto-detects the file as text (and not as binary).\n>\n\n\n"},{"id":"367950","messageId":"20190129124031.GA13084@sigill.intra.peff.net","threadId":"50335","inReplyTo":"20190129073810.23op5qaibyj2amwq@tb-raspi4","subject":"[PATCH v2 0/2] eol/autocrlf doc clarifications","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-29T12:40:31Z","receivedAt":"2019-01-29T12:40:34Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jan 29, 2019 at 07:38:10AM +0000, Torsten Bögershausen wrote:\n\n> > Yeah, I think the word \"property\" is unnecessarily confusing. Here's\n> > another patch (meant to go on top of the other).\n> \n> The property was originally meant to say:\n> - Either the \"text\" attribute is set in .gitattributes\n>   or\n> - The \"text=auto\" attribute is set in .gitattributes and\n>   Git auto-detects the file as text (and not as binary).\n\nThanks, that makes it much more clear what the original was trying to\nsay.\n\n> > +\tconversion. Note that this value is ignored if `core.autocrlf`\n> > +\tis set to `true`.\n> \n> Should that be\n>  > +\tconversion. Note that this value is ignored if `core.autocrlf`\n>  > +\tis set to `true` or `input`.\n\nYes (and ditto in the other patch).\n\nHere's a re-roll of both patches addressing these issues.\n\n  [1/2]: doc/gitattributes: clarify \"autocrlf overrides eol\"\n  [2/2]: docs/config: clarify \"text property\" in core.eol\n\n Documentation/config/core.txt   | 7 +++++--\n Documentation/gitattributes.txt | 4 +++-\n 2 files changed, 8 insertions(+), 3 deletions(-)\n\n-Peff\n"},{"id":"367951","messageId":"20190129124107.GA21931@sigill.intra.peff.net","threadId":"50335","inReplyTo":"20190129124031.GA13084@sigill.intra.peff.net","subject":"[PATCH v2 1/2] doc/gitattributes: clarify \"autocrlf overrides eol\"","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-29T12:41:07Z","receivedAt":"2019-01-29T12:41:10Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"We only override core.eol with core.autocrlf when the latter is set to\nsomething besides \"false\".  Let's make this more clear, and point the\nreader to the git-config definitions, which discuss this in more detail.\n\nNoticed-by: Sergey Lukashev <lukashev.s@ya.ru>\nSigned-off-by: Jeff King <peff@peff.net>\n---\n Documentation/gitattributes.txt | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt\nindex b8392fc330..ce383e97dc 100644\n--- a/Documentation/gitattributes.txt\n+++ b/Documentation/gitattributes.txt\n@@ -124,7 +124,9 @@ text file is normalized, its line endings are converted to LF in the\n repository.  To control what line ending style is used in the working\n directory, use the `eol` attribute for a single file and the\n `core.eol` configuration variable for all text files.\n-Note that `core.autocrlf` overrides `core.eol`\n+Note that setting `core.autocrlf` to `true` or `input` overrides\n+`core.eol` (see the definitions of those options in\n+linkgit:git-config[1]).\n \n Set::\n \n-- \n2.20.1.845.g57b86ca485\n\n"},{"id":"367952","messageId":"20190129124112.GB21931@sigill.intra.peff.net","threadId":"50335","inReplyTo":"20190129124031.GA13084@sigill.intra.peff.net","subject":"[PATCH v2 2/2] docs/config: clarify \"text property\" in core.eol","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-29T12:41:12Z","receivedAt":"2019-01-29T12:41:15Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The word \"property\" is vague here. Let's spell out that we mean the path\nmust be marked with the text attribute.\n\nWhile we're here, let's make the paragraph a little easier to read by\nde-emphasizing the \"when core.autocrlf is false\" bit. Putting it in the\nfirst sentence obscures the main content, and many readers won't care\nabout autocrlf (i.e., anyone who is just following the gitattributes(7)\nadvice, which mainly discusses \"text\" and \"core.eol\").\n\nHelped-by: Torsten Bögershausen <tboegi@web.de>\nSigned-off-by: Jeff King <peff@peff.net>\n---\n Documentation/config/core.txt | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config/core.txt b/Documentation/config/core.txt\nindex d0e6635fe0..7e9b6c8f4c 100644\n--- a/Documentation/config/core.txt\n+++ b/Documentation/config/core.txt\n@@ -121,11 +121,14 @@ core.quotePath::\n \n core.eol::\n \tSets the line ending type to use in the working directory for\n-\tfiles that have the `text` property set when core.autocrlf is false.\n+\tfiles that are marked as text (either by having the `text`\n+\tattribute set, or by having `text=auto` and Git auto-detecting\n+\tthe contents as text).\n \tAlternatives are 'lf', 'crlf' and 'native', which uses the platform's\n \tnative line ending.  The default value is `native`.  See\n \tlinkgit:gitattributes[5] for more information on end-of-line\n-\tconversion.\n+\tconversion. Note that this value is ignored if `core.autocrlf`\n+\tis set to `true` or `input`.\n \n core.safecrlf::\n \tIf true, makes Git check if converting `CRLF` is reversible when\n-- \n2.20.1.845.g57b86ca485\n"}]}