git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Chris Torek <chris.torek@gmail.com>
To: Jeff King <peff@peff.net>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Git List <git@vger.kernel.org>
Subject: Re: [PATCH] diff: check for merge bases before assigning sym->base
Date: Wed, 8 Jul 2020 10:05:44 -0700	[thread overview]
Message-ID: <CAPx1GvfLpTR-weVQcWm5iX59cmCh2Gad+vU=ESqqLkCq-O5RmA@mail.gmail.com> (raw)
In-Reply-To: <20200708043819.GA2303891@coredump.intra.peff.net>

On Tue, Jul 7, 2020 at 9:38 PM Jeff King <peff@peff.net> 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

  reply	other threads:[~2020-07-08 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07 23:54 t4068 test failure with -fsanitize=address brian m. carlson
2020-07-08  4:38 ` [PATCH] diff: check for merge bases before assigning sym->base Jeff King
2020-07-08 17:05   ` Chris Torek [this message]
2020-07-09 23:02     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPx1GvfLpTR-weVQcWm5iX59cmCh2Gad+vU=ESqqLkCq-O5RmA@mail.gmail.com' \
    --to=chris.torek@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).