git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 1, 2014, 17:01 UTC
Message-ID
<xmqqa98txbba.fsf@gitster.dls.corp.google.com>
In-Reply-To
<alpine.DEB.1.00.1406301650430.14982@s15462909.onlinehome-server.info>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 25 quoted lines
> 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,
>>  					      dest ? dest + size : NULL);
>>  			/* Postimage from side #1 */
>>  			if (m->mode & 1)
>> -				size += xdl_recs_copy(xe1, m->i1, m->chg1, 1,
>> +				size += xdl_recs_copy(xe1, m->i1, m->chg1, (m->mode & 2),
>>  						      dest ? dest + size : NULL);
>>  			/* Postimage from side #2 */
>>  			if (m->mode & 2)
>> -				size += xdl_recs_copy(xe2, m->i2, m->chg2, 1,
>> +				size += xdl_recs_copy(xe2, m->i2, m->chg2, 0,
>>  						      dest ? dest + size : NULL);
>>  		} else
>>  			continue;
>
> Makes sense to me, especially with the nice explanation in the commit
> message.
> Having said that, here is my ACK for the current revision of the patch
> series ...
Thanks, both.  Queued.
Previous: Johannes SchindelinNext: Max Kirillov
Message 5 of 8 in “git-merge-file: do not add LF at EOF while applying unrelated change”
  1. 0/2 git-merge-file: do not add LF at EOF while applying unrelated changeMax Kirillov, Jun 28, 2014
  2. 1/2 t6023-merge-file.sh: fix and mark as broken invalid testsMax Kirillov, Jun 28, 2014
  3. 2/2 git-merge-file: do not add LF at EOF while applying unrelated changeMax Kirillov, Jun 28, 2014
  4. Johannes SchindelinJun 30, 2014
  5. Junio C HamanoJul 1, 2014
  6. Max KirillovJul 2, 2014
  7. Johannes SchindelinJul 2, 2014
  8. Max KirillovJul 3, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.