Re: merge-base --is-ancestor A B is unreasonably slow with unrelated history B
- Date: Tue, 09 Jan 2018 11:13:11 -0800
- From: Junio C Hamano <gitster@xxxxxxxxx>
- Subject: Re: merge-base --is-ancestor A B is unreasonably slow with unrelated history B
Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:
> This is obviously a pathological case, but maybe we should work slightly
> harder on the RHS of and discover that it itself is an orphan commit.
In order to discover a commit is an orphan, you'd need to prove not
just that it does not reach the main part of the history (which is
cheap---its parenthood network would be quite limited and traversing
all of it is not that expensive) but the other way around, i.e. the
main part of the history would not reach it.
Do you have a cheaper way to do the latter than a full traveral of
the main history? If not, then the cost similar to "git log master"