mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor(repository)!: move descendantOf()
method into Commit (#43)
This commit is contained in:
parent
9918ab0905
commit
bad5e20581
4 changed files with 21 additions and 47 deletions
|
@ -617,21 +617,6 @@ class Repository {
|
|||
);
|
||||
}
|
||||
|
||||
/// Checks if a provided [commit] is the descendant of another [ancestor]
|
||||
/// commit.
|
||||
///
|
||||
/// Note that a commit is not considered a descendant of itself, in contrast
|
||||
/// to `git merge-base --is-ancestor`.
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
bool descendantOf({required Oid commit, required Oid ancestor}) {
|
||||
return graph_bindings.descendantOf(
|
||||
repoPointer: _repoPointer,
|
||||
commitPointer: commit.pointer,
|
||||
ancestorPointer: ancestor.pointer,
|
||||
);
|
||||
}
|
||||
|
||||
/// Returns list with the `ahead` and `behind` number of unique commits
|
||||
/// respectively.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue