Re: [PATCH 1/2] diffcore-break: don't divide by zero

2013-04-02 Thread Junio C Hamano
John Keeping writes: > The message for commit 6dd4b66 (Fix diffcore-break total breakage) > indicates that "don't bother to break small files" is wrong in some > cases, but it I wonder if "don't bother to break empty files" is okay. This has a rather subtle ramifications, and we would need to th

Re: [PATCH 1/2] diffcore-break: don't divide by zero

2013-04-02 Thread John Keeping
On Tue, Apr 02, 2013 at 02:15:17PM -0700, Junio C Hamano wrote: > John Keeping writes: > > > When the source file is empty, the calculation of the merge score > > results in a division by zero. Since the merge score is initialized to > > zero, it makes sense to just leave it as it is if the sour

Re: [PATCH 1/2] diffcore-break: don't divide by zero

2013-04-02 Thread Junio C Hamano
John Keeping writes: > When the source file is empty, the calculation of the merge score > results in a division by zero. Since the merge score is initialized to > zero, it makes sense to just leave it as it is if the source size is > zero. This means that we still use the extent of damage metr

[PATCH 1/2] diffcore-break: don't divide by zero

2013-04-02 Thread John Keeping
When the source file is empty, the calculation of the merge score results in a division by zero. Since the merge score is initialized to zero, it makes sense to just leave it as it is if the source size is zero. This means that we still use the extent of damage metric to decide whether to break t