{"thread":{"id":"46875","subject":"what is git's position on \"classic\" mac <CR>-only end of lines?","startedAt":"2017-10-01T17:52:59Z","lastAt":"2017-10-01T21:30:05Z","messageCount":4,"participants":["Robert P. J. Day","Bryan Turner","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"329314","messageId":"alpine.LFD.2.21.1710011349560.23227@localhost.localdomain","threadId":"46875","inReplyTo":null,"subject":"what is git's position on \"classic\" mac <CR>-only end of lines?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2017-10-01T17:52:52Z","receivedAt":"2017-10-01T17:52:59Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"\n  sorry for more pedantic nitpickery, but i'm trying to write a\nsection on how to properly process mixtures of EOLs in git, and when i\nread \"man git-config\", everything seems to refer to Mac OS X and macOS\n(and linux, of course) using <LF> for EOL, with very little mention of\nwhat one does if faced with \"classic\" mac EOL of just <CR>.\n\n  is there a description of what happens in that case? or is it\nconsidered not important enough to deal with?\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                        http://crashcourse.ca\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================\n"},{"id":"329315","messageId":"CAGyf7-H+1Djb_dmzfOO3qqM9+2VKvbqVedn4mof9Hq4huDTsqw@mail.gmail.com","threadId":"46875","inReplyTo":"alpine.LFD.2.21.1710011349560.23227@localhost.localdomain","subject":"Re: what is git's position on \"classic\" mac <CR>-only end of lines?","fromName":"Bryan Turner","fromEmail":"bturner@atlassian.com","sentAt":"2017-10-01T19:29:16Z","receivedAt":"2017-10-01T19:29:22Z","isPatch":false,"sender":{"key":"bturner@atlassian.com","avatar":"https://gravatar.com/avatar/16bcf3167981c1ef7c804e502642366d888a35b0d0b0a4ca01fdc442aa1acb1e?d=mp&s=160"},"body":"On Sun, Oct 1, 2017 at 10:52 AM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n>\n>   sorry for more pedantic nitpickery, but i'm trying to write a\n> section on how to properly process mixtures of EOLs in git, and when i\n> read \"man git-config\", everything seems to refer to Mac OS X and macOS\n> (and linux, of course) using <LF> for EOL, with very little mention of\n> what one does if faced with \"classic\" mac EOL of just <CR>.\n\n No command in Git that I'm aware of considers a standalone <CR> to be\na line ending. A file containing only <CR>s is treated as a single\nline by every Git command I've used. I'm not sure whether that\nbehavior is configurable. For files with standalone <CR>s mixed with\nother line endings (<CRLF> or <LF>, either or both), the <CRLF> and\n<LF> endings are both considered line endings while the standalone\n<CR>s are not.\n\nThat's just based on my experience with them, though. In general, `git\nblame` and `git diff`, for example, don't seem honor them. Perhaps\nsomeone else knows of some useful knows of which I'm not aware.\n\nBest regards,\nBryan Turner\n"},{"id":"329319","messageId":"a8cb7c82-4598-5dce-0e0e-b0f18157cc56@kdbg.org","threadId":"46875","inReplyTo":"CAGyf7-H+1Djb_dmzfOO3qqM9+2VKvbqVedn4mof9Hq4huDTsqw@mail.gmail.com","subject":"Re: what is git's position on \"classic\" mac <CR>-only end of lines?","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2017-10-01T20:58:37Z","receivedAt":"2017-10-01T20:58:46Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 01.10.2017 um 21:29 schrieb Bryan Turner:\n> On Sun, Oct 1, 2017 at 10:52 AM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n>>\n>>    sorry for more pedantic nitpickery, but i'm trying to write a\n>> section on how to properly process mixtures of EOLs in git, and when i\n>> read \"man git-config\", everything seems to refer to Mac OS X and macOS\n>> (and linux, of course) using <LF> for EOL, with very little mention of\n>> what one does if faced with \"classic\" mac EOL of just <CR>.\n> \n>   No command in Git that I'm aware of considers a standalone <CR> to be\n> a line ending. A file containing only <CR>s is treated as a single\n> line by every Git command I've used. I'm not sure whether that\n> behavior is configurable. For files with standalone <CR>s mixed with\n> other line endings (<CRLF> or <LF>, either or both), the <CRLF> and\n> <LF> endings are both considered line endings while the standalone\n> <CR>s are not.\n\nThat's true, AFAIK. In addition, when Git auto-detects whether a file is \nbinary or text, then a file with a bare CR is treated as binary:\n\nhttps://github.com/git/git/blob/master/convert.c#L91\n\nThat basically amounts to: \"it [is] considered not important enough to \ndeal with\" ;)\n\n-- Hannes\n"},{"id":"329321","messageId":"alpine.LFD.2.21.1710011723360.27763@localhost.localdomain","threadId":"46875","inReplyTo":"a8cb7c82-4598-5dce-0e0e-b0f18157cc56@kdbg.org","subject":"Re: what is git's position on \"classic\" mac <CR>-only end of lines?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2017-10-01T21:29:58Z","receivedAt":"2017-10-01T21:30:05Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"On Sun, 1 Oct 2017, Johannes Sixt wrote:\n\n> Am 01.10.2017 um 21:29 schrieb Bryan Turner:\n> > On Sun, Oct 1, 2017 at 10:52 AM, Robert P. J. Day <rpjday@crashcourse.ca>\n> > wrote:\n> > >\n> > >    sorry for more pedantic nitpickery, but i'm trying to write a\n> > > section on how to properly process mixtures of EOLs in git, and\n> > > when i read \"man git-config\", everything seems to refer to Mac\n> > > OS X and macOS (and linux, of course) using <LF> for EOL, with\n> > > very little mention of what one does if faced with \"classic\" mac\n> > > EOL of just <CR>.\n> >\n> >   No command in Git that I'm aware of considers a standalone <CR>\n> > to be a line ending. A file containing only <CR>s is treated as a\n> > single line by every Git command I've used. I'm not sure whether\n> > that behavior is configurable. For files with standalone <CR>s\n> > mixed with other line endings (<CRLF> or <LF>, either or both),\n> > the <CRLF> and <LF> endings are both considered line endings while\n> > the standalone <CR>s are not.\n>\n> That's true, AFAIK. In addition, when Git auto-detects whether a\n> file is binary or text, then a file with a bare CR is treated as\n> binary:\n>\n> https://github.com/git/git/blob/master/convert.c#L91\n>\n> That basically amounts to: \"it [is] considered not important enough\n> to deal with\" ;)\n\n  that's fine, that's all i was after -- basically, git handles Mac OS\nX and macOS, and if you're dealing with mac \"classic\" EOLs, well ...\n\n  http://i.imgur.com/z96dZ0x.jpg\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                        http://crashcourse.ca\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================\n"}]}