pub enum WorktreeBranch {
Existing(String),
Create(String),
CreateOrReset(String),
Detach,
Orphan(String),
}Expand description
How add_linked_worktree attaches HEAD to a branch.
Variants§
Existing(String)
Check out an existing local branch (its tip must match the start commit).
Create(String)
Create refs/heads/<name> at the start commit (fails when the branch exists).
CreateOrReset(String)
Create or reset refs/heads/<name> to the start commit (git worktree add -B).
Detach
Detached HEAD at the start commit.
Orphan(String)
HEAD on the unborn branch refs/heads/<name>, with an empty working tree and
index (git worktree add --orphan). The start point is ignored and the repository
need not have any commits. Fails when the branch exists.
Trait Implementations§
Source§impl Clone for WorktreeBranch
impl Clone for WorktreeBranch
Source§impl Debug for WorktreeBranch
impl Debug for WorktreeBranch
impl Eq for WorktreeBranch
Source§impl PartialEq for WorktreeBranch
impl PartialEq for WorktreeBranch
impl StructuralPartialEq for WorktreeBranch
Auto Trait Implementations§
impl Freeze for WorktreeBranch
impl RefUnwindSafe for WorktreeBranch
impl Send for WorktreeBranch
impl Sync for WorktreeBranch
impl Unpin for WorktreeBranch
impl UnsafeUnpin for WorktreeBranch
impl UnwindSafe for WorktreeBranch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.