Re: [PATCH 3/3] merge-base: find fork-point outside partial reflog
- From
Jeff King <peff@peff.net>
- Date
- Sep 14, 2017, 14:37 UTC
- Message-ID
- <20170914143746.nnl27a7r4spklooj@sigill.intra.peff.net>
- In-Reply-To
- <f16c671b268432199a0b2e0d22bb1b786a44bb2a.1505394278.git.git@grubix.eu>
On Thu, Sep 14, 2017 at 03:15:20PM +0200, Michael J Gruber wrote:
Show 8 quoted lines
> In fork-point mode, merge-base adds the commit at refname to a list of > candidates to walk from only when the reflog is empty. Therefore, it > fails to find merge bases that are descendants of the most recent reflog > entry. > > Add the commit at the tip unconditionally so that a merge base on the > history of refname is found in any case, independent of the state of the > reflog.
OK, so the reflog we are interested in here is one where the tip commit is not mentioned. I'm not sure how one gets into that state, but I agree it makes sense to act as if it's there.
-Peff