mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
feat(worktree): add ability to create worktree from provided reference
This commit is contained in:
parent
a00078ba76
commit
db21f2e890
6 changed files with 80 additions and 5 deletions
|
@ -115,11 +115,19 @@ class Branch {
|
|||
return Branch(bindings.rename(_branchPointer, newName, force));
|
||||
}
|
||||
|
||||
/// Determines if HEAD points to the given branch.
|
||||
/// Checks if HEAD points to the given branch.
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
bool get isHead => bindings.isHead(_branchPointer);
|
||||
|
||||
/// Checks if any HEAD points to the current branch.
|
||||
///
|
||||
/// This will iterate over all known linked repositories (usually in the form of worktrees)
|
||||
/// and report whether any HEAD is pointing at the current branch.
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
bool get isCheckedOut => bindings.isCheckedOut(_branchPointer);
|
||||
|
||||
/// Returns the branch name.
|
||||
///
|
||||
/// Given a reference object, this will check that it really is a branch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue