Re: [PATCH 2/2] merge-file: consider core.crlf when writing merge markers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Eric,

On Sun, 24 Jan 2016, Eric Sunshine wrote:

> On Sun, Jan 24, 2016 at 5:37 AM, Johannes Schindelin
> <Johannes.Schindelin@xxxxxx> wrote:
> > On Fri, 22 Jan 2016, Eric Sunshine wrote:
> >> On Fri, Jan 22, 2016 at 2:50 PM, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> 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!
> 
> And, without the unnecessary 'cat', of course (don't know what I was thinking):
> 
>     test $(tr "\015" Q <output.txt | grep "\.txtQ$" | wc -l) = 3

Heh, I automatically removed the "cat" in my mind already, and as you can
see from my v2, I used precisely the cat-less form you suggested.

Ciao,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]