Re: [PATCH 2/2] sh-setup: explicitly mark CR as a field separator
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 25, 2015, 13:25 UTC
- Message-ID
- <alpine.DEB.1.00.1510251422310.31610@s15462909.onlinehome-server.info>
- In-Reply-To
- <20151025131059.GA370025@vauxhall.crustytoothpaste.net>
Hi Brian,
re-Cc:ing the Git mailing list.
On Sun, 25 Oct 2015, brian m. carlson wrote:
Show 29 quoted lines
> On Sun, Oct 25, 2015 at 01:50:32PM +0100, Johannes Schindelin wrote: > > This is the correct thing to do, really: we already specify LF as > > field separator. > > > > Incidentally, this fixes the problem interactive rebase has when the > > editor wants to save text with CR/LF line endings, as WordPad does > > in Windows 10. > > > > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> > > --- > > git-sh-setup.sh | 2 +- > > t/t3404-rebase-interactive.sh | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/git-sh-setup.sh b/git-sh-setup.sh > > index 4691fbc..94dfe04 100644 > > --- a/git-sh-setup.sh > > +++ b/git-sh-setup.sh > > @@ -13,7 +13,7 @@ unset CDPATH > > # do not equate an unset IFS with IFS with the default, so here is > > # an explicit SP HT LF. > > IFS=' > > -' > > +'"$(printf '')" > > On Linux, printf '' produces no output. From my understanding of the > POSIX spec, this is the correct behavior. Does it behave differently > on Windows? If so, it might be nice to explain that in the commit > messgae.
Hrm. This is apparently a bug in the script I tried to write for three days now (because the mailing list-based code submission is really *so* much more tedious than the Pull Request-based process I got so used to).
The '' should really read '\r'.
Ciao, Johannes