Re: [PATCH] diff: check for merge bases before assigning sym->base

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

 



On Tue, Jul 7, 2020 at 9:38 PM Jeff King <peff@xxxxxxxx> wrote:
> I suspect the solution is [to call die one line earlier]:

Oops, yes.

> I don't see anything within this function guaranteeing that rpos is set,
> either, though I suspect it is OK due to how the revision parser works.

Yes, I am depending on the revision parser to balance the left and
right items.  I thought about having a BUG check but it seemed
unnecessary.  On the other hand, I'm avoiding depending on its
*placement* of left and right items.  Being more defensive might
be good here.

(I had a version of this that also implemented Junio's suggestion
of not first marking all bases, then unmarking the chosen base,
but in the end it came out to the same amount of code.  I could
resurrect that if anyone cares.)

Chris



[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