Re: [PATCH v2 1/1] merge-file: let conflict markers match end-of-line style of the context
- From
Ramsay Jones <ramsay@ramsayjones.plus.com>
- Date
- Jan 26, 2016, 16:43 UTC
- Message-ID
- <56A7A240.7000102@ramsayjones.plus.com>
- In-Reply-To
- <alpine.DEB.2.20.1601260951030.2964@virtualbox>
On 26/01/16 08:54, Johannes Schindelin wrote:
> Hi Ramsay,
[snip]
Show 9 quoted lines
>> >> But you are only testing 3/4 conflict markers end in CR/LF. :-D > > The fact that ||| markers are present is the fault of previous test cases. > I tried to make a point of *not* relying on such a side effect (so as to > debug failures quicker by commenting out all previous test cases). > > So the fact that I am testing only 3 of the 4 conflict markers is very > much by design.
I'm sorry, but I don't understand what you are trying to say here. :(
Show 13 quoted lines
> >>> Read: I am uncertain that I want to spend the additional lines on >>> testing more than actually necessary. >> >> If the here doc is too verbose for you, how about something like this >> (totally untested): >> >> test $(tr "\015" Q <crlf.txt | grep "^[<=>|].*Q$" | wc -l) -eq 4 >> >> instead? > > Hmm. I do not see the benefit over grepping for `txtQ$` it's essentially > the same.
Well, as I said 'totally untested', but it _should_ be different. ;-)
The output from the 'tr "\015" Q <crlf.txt' subcommand should look something like:
1Q
2Q
<<<<<<< crlf-diff1.txtQ
4Q
||||||| crlf-orig.txtQ
3Q
=======Q
5Q
>>>>>>> crlf-diff2.txtQso that your 'grep "\\.txtQ$"' should select these lines:
<<<<<<< crlf-diff1.txtQ
||||||| crlf-orig.txtQ
>>>>>>> crlf-diff2.txtQwhereas my 'grep "^[<=>|].*Q$"' should select these lines:
<<<<<<< crlf-diff1.txtQ
||||||| crlf-orig.txtQ
=======Q
>>>>>>> crlf-diff2.txtQ(ie. select all 4 conflict markers).
> >> HTH > > How the hell?
:-D Hope That Helps.
Show 5 quoted lines
> >> ATB, >> Ramsay Jones > > Authorization to Buy?
All The Best.
ATB, Ramsay Jones