Skip to contentSkip to conversation

determine if one commit is an ancestor of another

DISCUSSION Larry D'Anna 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Is there any builtin to do this? I'm doing it in a perl script now by parsing git log --pretty=raw, but it's pretty slow for a big repository.

    --larry
#1 lore raw

Hi,

Quoted 2 lines · Larry D'Anna

Is there any builtin to do this? I'm doing it in a perl script now by parsing git log --pretty=raw, but it's pretty slow for a big repository.

test $ancestor = $(git merge-base $ancestor $descendant)

Ciao,
Dscho