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
threads / discuss / 20065
Subject: determine if one commit is an ancestor of another
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
Re: determine if one commit is an ancestor of another
Hi,
On Thu, 9 Jul 2009, Larry D'Anna wrote:
> 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