{"thread":{"id":"57863","subject":"Confusing note in \"gitattributes text=auto\" discription","startedAt":"2022-05-09T10:59:17Z","lastAt":"2022-05-09T15:27:38Z","messageCount":2,"participants":["Hebrock, Christoph","Torsten Bögershausen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"454996","messageId":"AM6PR03MB5444D37306312CE538C9BD1BCAC69@AM6PR03MB5444.eurprd03.prod.outlook.com","threadId":"57863","inReplyTo":null,"subject":"Confusing note in \"gitattributes text=auto\" discription","fromName":"Hebrock, Christoph","fromEmail":"ch@generationdesign.de","sentAt":"2022-05-09T10:59:08Z","receivedAt":"2022-05-09T10:59:17Z","isPatch":false,"sender":{"key":"ch@generationdesign.de","avatar":null},"body":"Dear Sir or Madam,\nI have a question about \"gitattributes text\".\n\nI find the sentence \"When the file has been committed with CRLF, no conversion is done\" somewhat confusing in the context descibed above.\nHow is this possible when \"text=auto\" is active to commit/checkin CRLF?\n\nSet to string value \"auto\"\nWhen text is set to \"auto\", the path is marked for automatic end-of-line conversion. If Git decides that the content is text, its line endings are converted to LF on checkin. \n\"When the file has been committed with CRLF, no conversion is done.\"\n\n\nWith kind regards\nChristoph Hebrock\n"},{"id":"455007","messageId":"20220509152728.32kgmus6dht7uofn@tb-raspi4","threadId":"57863","inReplyTo":"AM6PR03MB5444D37306312CE538C9BD1BCAC69@AM6PR03MB5444.eurprd03.prod.outlook.com","subject":"Re: Confusing note in \"gitattributes text=auto\" discription","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2022-05-09T15:27:28Z","receivedAt":"2022-05-09T15:27:38Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Mon, May 09, 2022 at 10:59:08AM +0000, Hebrock, Christoph wrote:\n> Dear Sir or Madam,\n> I have a question about \"gitattributes text\".\n>\n> I find the sentence \"When the file has been committed with CRLF, no conversion is done\" somewhat confusing in the context descibed above.\n> How is this possible when \"text=auto\" is active to commit/checkin CRLF?\n>\n> Set to string value \"auto\"\n> When text is set to \"auto\", the path is marked for automatic end-of-line conversion. If Git decides that the content is text, its line endings are converted to LF on checkin.\n> \"When the file has been committed with CRLF, no conversion is done.\"\n\nThis is what happens in real live, and what we try to describe:\n#On a Windows box:\nmkdir test_repo\ncd test_repo\ngit init\ngit config core.autocrlf false\nprintf 'REM my first BAT file\\r\\n' >test.bat\nprintf 'REM exit' >>test.bat\ngit add test.bat\ngit commit -m \"Add test.bat\"\n\ngit ls-files --eol\n# Something in this style:\ni/crlf w/crlf attr/            test.bat\n\nNow the file has been commited with CRLF.\n\nDoes this answer the question ?\n\n\n\n"}]}