Re: [PATCH 2/2] merge-file: consider core.crlf when writing merge markers
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 24, 2016, 10:37 UTC
- Message-ID
- <alpine.DEB.2.20.1601241137260.2964@virtualbox>
- In-Reply-To
- <CAPig+cSf_Hac=4+F1bRaFeYdFrjo6SH=vApdUDkhep5BUve+Kw@mail.gmail.com>
Hi Eric,
On Fri, 22 Jan 2016, Eric Sunshine wrote:
Show 13 quoted lines
> On Fri, Jan 22, 2016 at 2:50 PM, Eric Sunshine <sunshine@sunshineco.com> wrote: > > On Fri, Jan 22, 2016 at 06:01:25PM +0100, Johannes Schindelin wrote: > >> +test_expect_success 'conflict markers contain CRLF when core.eol=crlf' ' > >> + test_must_fail git -c core.eol=crlf merge-file -p \ > >> + nolf-diff1.txt nolf-orig.txt nolf-diff2.txt >output.txt && > >> + test $(sed -n "/\.txt\r$/p" output.txt | wc -l) = 3 > > > > The "\r" isn't recognized by 'sed' on Mac OS X or BSD. Perhaps use > > instead: > > > > test $(cat output.txt | tr "\015" Q | sed -n "/\.txtQ$/p" | wc -l) = 3 > > Or the 'sed' could even become at 'grep' at this point.
Good point, thanks!
Ciao, Dscho