grgit-isAncestorOf

Name

grgit-isAncestorOf - Tell if a commit is an ancestor of another.

Synopsis

grgit.isAncestorOf(<base commit>,  <tip commit>)

Description

Given a base commit and a tip commit, return true if the base commit can be reached by walking back from the tip.

Options

  1. (Object) base commit. For a more complete list of objects you can pass in, see grgit-resolve (specifically the toCommit method).

  2. (Object) tip commit. For a more complete list of objects you can pass in, see grgit-resolve (specifically the toCommit method).

Examples

grgit.isAncestorOf('v1.2.3', 'master')

See Also