Re: [PATCH v2 0/2] Fix interactive rebase when the editor saves with CR/LF
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 26, 2015, 19:13 UTC
- Message-ID
- <xmqqsi4xh298.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <alpine.DEB.1.00.1510261133030.31610@s15462909.onlinehome-server.info>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 7 quoted lines
> A simple test with CR/LF line endings in a script reveals that it is > pretty solid: > > x=a > case "$x" in a) echo b;; esac > > prints out 'b', as expected.
I do not see what this has to do with anything.
The shell language parser when parsing a script may do the right thing, but the bug I was alluding to was that your 'read' does not seem to be removing the terminating <newline> (which is CRLF on your platform) after reading a line before splitting the contents on the line at IFS boundaries.
> Again. If CR has no place in IFS, why does LF have a place in IFS? It > makes *no* sense to argue for one and against the other.
See my message to Matthieu.