Re: [PATCH v2 2/2] git-merge-file: do not add LF at EOF while applying unrelated change

2014-07-02 Thread Johannes Schindelin
Hi Max, On Wed, 2 Jul 2014, Max Kirillov wrote: On Mon, Jun 30, 2014 at 04:55:10PM +0200, Johannes Schindelin wrote: I just wish the tests were a little easier to understand... What could be improved with them? Oh, I would name the files more appropriately, for example. That is, instead

Re: [PATCH v2 2/2] git-merge-file: do not add LF at EOF while applying unrelated change

2014-07-02 Thread Max Kirillov
On Wed, Jul 02, 2014 at 04:08:28PM +0200, Johannes Schindelin wrote: What could be improved with them? Oh, I would name the files more appropriately, for example. That is, instead of test1.txt I would call it mixed-endings.txt or lf-only.txt or some such. And instead of the Latin version

Re: [PATCH v2 2/2] git-merge-file: do not add LF at EOF while applying unrelated change

2014-07-01 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: Hi Max, On Sun, 29 Jun 2014, Max Kirillov wrote: diff --git a/xdiff/xmerge.c b/xdiff/xmerge.c index 9e13b25..625198e 100644 --- a/xdiff/xmerge.c +++ b/xdiff/xmerge.c @@ -245,11 +245,11 @@ static int xdl_fill_merge_buffer(xdfenv_t

Re: [PATCH v2 2/2] git-merge-file: do not add LF at EOF while applying unrelated change

2014-07-01 Thread Max Kirillov
On Mon, Jun 30, 2014 at 04:55:10PM +0200, Johannes Schindelin wrote: I just wish the tests were a little easier to understand... What could be improved with them? Having said that, here is my ACK for the current revision of the patch series Thanks. By the way, for \r\n eol it did even

Re: [PATCH v2 2/2] git-merge-file: do not add LF at EOF while applying unrelated change

2014-06-30 Thread Johannes Schindelin
Hi Max, On Sun, 29 Jun 2014, Max Kirillov wrote: diff --git a/xdiff/xmerge.c b/xdiff/xmerge.c index 9e13b25..625198e 100644 --- a/xdiff/xmerge.c +++ b/xdiff/xmerge.c @@ -245,11 +245,11 @@ static int xdl_fill_merge_buffer(xdfenv_t *xe1, const char *name1,

[PATCH v2 2/2] git-merge-file: do not add LF at EOF while applying unrelated change

2014-06-28 Thread Max Kirillov
If 'current-file' does not contain LF at EOF, and change between 'base-file' and 'other-file' does not change any line close to EOF, the 3-way merge should not add LF to EOF. This is what 'diff3 -m' does, and seems to be a reasonable expectation. The change which introduced the behavior is