2017-05-01 16:44 GMT+02:00 Ben Coman <btc@openinworld.com>:On Fri, Apr 28, 2017 at 1:47 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:Ben,On Fri, Apr 28, 2017 at 6:16 AM, Eliot Miranda <eliot.miranda@gmail.com> wrote:On Thu, Apr 27, 2017 at 2:38 PM, Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com > wrote:The LF are displayed correctly in Squeak/Pharo and we can use nextLine in replacement of upTo: Character cr, so I fail to see the problem of LF.Hi Eliot,it's not about my favourite editor, it's about the universally available one:
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/57c 9ef837f7b0914351c4836734d1df3c 880c288
Could you explain?It's ok. I give up. This is another example of the tail wagging the dog, which gets on my nerves. But getting them to fix their interface is way more difficult than us accommodating their limitations so go ahead.Its not github! When looking into Sophie's issue, opening those ST scripts were unreadablewhen opened in `vi` . It was a pain that I had to break context to hunt for a GUI text app to read themI'd advocate going to LF EOL, but if its really important, a bit of research dug up how git can work with CR-line-endingHere is a recipe to demonstrate the effect.First restore one commit back from "Use LF instead of CR as image/*.st line ending"$ git status # && git stash # if required$ git checkout 9fd4e371~1HEAD detached at 11d990enothing to commit, working directory clean$ git diffno output, okay.Make a change in directory opensmalltalk-vm/image/ $ vi StartReader.stinsert a line "comment 1"$ git diff@@ -1 +1 @@-Transcript clear.^MSmalltalk snapshot: true andQuit: true.^M[[Processor activeProcess bindToThreadId: 2]^M on: Error^M do: [:ex|].^M StdioListener new run] forkAt: Processor activePriority + 1+"comment 1"^MTranscript clear.^MSmalltalk snapshot: true andQuit: true.^M[[Processor activeProcess bindToThreadId: 2]^M on: Error^M do: [:ex|].^M StdioListener new run] forkAt: Processor activePriority + 1^Myuck!Add a git filter for ST files...$ vi opensmalltalk-vm/.git/configappend...[filter "crLineEnd"]clean = tr '\\r' '\\n'smudge = tr '\\n' '\\r'$ vi opensmalltalk-vm/.gitattributes append...*.st filter=crLineEndCommit file so that EOLs are updated to LF internal to git.In directory opensmalltalk-vm/image/ ...$ git add StartReader.st$ git commit -m "apply filter - test only, throw away"Now make a second change...$ vi StartReader.stinsert line "comment 2"$ git diff@@ -1,4 +1,5 @@"comment 1"+"comment 2"Transcript clear.Smalltalk snapshot: true andQuit: true.[[Processor activeProcess bindToThreadId: 2]Better!I didn't test it on github, but IIUC it just uses `git diff`Thanks for the tip. Sounds like a viable way to not change our line end policy.The only thing I wonder: is unixy tr available on every client? (think windows...)