Re: [PATCH] rerere forget: grok files containing NUL

2013-04-02 Thread Johannes Sixt
Am 02.04.2013 00:48, schrieb Junio C Hamano: Johannes Sixt j...@kdbg.org writes: Using 'git rerere forget .' after a merge that involved binary files runs into an infinite loop if the binary file contains a zero byte. Replace a strchrnul by memchr because the former does not make progress

Re: [PATCH] rerere forget: grok files containing NUL

2013-04-02 Thread Junio C Hamano
Johannes Sixt j...@kdbg.org writes: Does the three-way merge machinery replay recorded resolution for such a binary file correctly (after your fix, that is)? Yes, it does. It recognizes the binary-ness and picks 'our' side. Only then comes rerere_mem_getline into play. Surely getline()

Re: [PATCH] rerere forget: grok files containing NUL

2013-04-02 Thread Johannes Sixt
Am 02.04.2013 21:18, schrieb Junio C Hamano: Johannes Sixt j...@kdbg.org writes: Does the three-way merge machinery replay recorded resolution for such a binary file correctly (after your fix, that is)? Yes, it does. It recognizes the binary-ness and picks 'our' side. Only then comes

Re: [PATCH] rerere forget: grok files containing NUL

2013-04-01 Thread Junio C Hamano
Johannes Sixt j...@kdbg.org writes: Using 'git rerere forget .' after a merge that involved binary files runs into an infinite loop if the binary file contains a zero byte. Replace a strchrnul by memchr because the former does not make progress as soon as the NUL is encountered. Hmph,