13. Graph¶
Contents
13.1. graph_ahead_behind¶
This Method help in comparing and finding number of commits in between 2 commits.
parameters | Returns |
---|---|
luagit2_repository | numbers_ahead (number) |
luagit2_oid (current) | numbers_behind(number) |
luagit2_oid(upstream) |
luagit2_repository
: The repository whose commits are to be compared.luagit2_oid
: The current commit.luagit2_oid
: The other upstream commit with which to compare.
- Returns two numbers in order:
- number of commits current commit is ahead of upstream commit.
- number of commits current commit is behind upstream commit.
Note
The upstream commit must be one of commits in the same tree as the other commit.
13.2. graph_descendant_of¶
Helps in checking if one commit is parent commit of other.
parameters | Returns |
---|---|
luagit2_repository | is_decendent (Boolean) |
luagit2_oid (current) | |
luagit2_oid(upstream) |
luagit2_repository
: The repository whose commits are to be compared.luagit2_oid
: The current commit to check.luagit2_oid
: The ancestor commit with which to compare.
- Returns a boolean value for whether current commit is a child commit of other or gives an error.