Re: Unable to split then edit hunk in git interactive add

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

 



On 24/11/2023 08:16, scarf wrote:
|Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)

Thanks for taking the time to report this. While it is a known limitation of "git add -p" that editing a hunk after splitting it can cause problems (see below) I am unable to reproduce this particular bug.

When a hunk is split the resulting hunks share the context lines around the split. The trailing context lines of the first hunk are the same lines as the leading context of the second hunk. If the shared context is edited then the lines no-longer match between the hunks which means they cannot be applied. In general it is better to avoid splitting a hunk if you plan to edit it.

Best Wishes

Phillip




[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