Re: merge-base --is-ancestor A B is unreasonably slow with unrelated history B

2018-01-10 Thread Ævar Arnfjörð Bjarmason
On Tue, Jan 09 2018, Derrick Stolee jotted: > On 1/9/2018 10:17 AM, Ævar Arnfjörð Bjarmason wrote: >> This is a pathological case I don't have time to dig into right now: >> >> git branch -D orphan; >> git checkout --orphan orphan && >> git reset --hard && >> touch foo && >>

Re: merge-base --is-ancestor A B is unreasonably slow with unrelated history B

2018-01-09 Thread Derrick Stolee
On 1/9/2018 10:17 AM, Ævar Arnfjörð Bjarmason wrote: This is a pathological case I don't have time to dig into right now: git branch -D orphan; git checkout --orphan orphan && git reset --hard && touch foo && git add foo && git commit -m"foo" && time git

Re: merge-base --is-ancestor A B is unreasonably slow with unrelated history B

2018-01-09 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason 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

merge-base --is-ancestor A B is unreasonably slow with unrelated history B

2018-01-09 Thread Ævar Arnfjörð Bjarmason
This is a pathological case I don't have time to dig into right now: git branch -D orphan; git checkout --orphan orphan && git reset --hard && touch foo && git add foo && git commit -m"foo" && time git merge-base --is-ancestor master orphan This takes around 5 seconds