Re: [PATCH v2 0/2] builtin add -p: fix hunk splitting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 19 2022, Junio C Hamano wrote:

> Phillip Wood <phillip.wood123@xxxxxxxxx> writes:
>
>> Even if the helper is finalizing the current hunk then I think that
>> "nonsense" hunk would still wrong as it would be calling
>> finalize_hunk() on _every_ context line in the hunk rather than just
>> being called once to finalize the hunk.
>
> True; this triggers every time we finish reading the common context
> lines and not at the end of hunk.  In any case, I think what we
> queued looks good for 'next'.

For what it's worth (and as the person who started this side-thread) I
agree. This looks good as-is, thanks both!

>>>   -		if ((marker == '-' || marker == '+') && *p == ' ')
>>> -			hunk->splittable_into++;
>>> +		if (*p == ' ')
>>> +			complete_file(marker, &hunk->splittable_into);




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux