pub struct Add<'a> { /* private fields */ }Expand description
Builder for git worktree add command.
See git worktree --help for full documentation.
Implementations§
Source§impl<'a> Add<'a>
impl<'a> Add<'a>
Sourcepub fn new_branch(self, branch: &'a str) -> Self
pub fn new_branch(self, branch: &'a str) -> Self
Create a new branch and checkout in the new worktree.
Corresponds to -b <branch>.
Sourcepub fn commit_ish(self, commit_ish: &'a str) -> Self
pub fn commit_ish(self, commit_ish: &'a str) -> Self
Set the commit-ish to create the worktree from.
Sourcepub async fn status(self) -> Result<(), CommandError>
pub async fn status(self) -> Result<(), CommandError>
Execute the command and return the exit status.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Add<'a>
impl<'a> RefUnwindSafe for Add<'a>
impl<'a> Send for Add<'a>
impl<'a> Sync for Add<'a>
impl<'a> Unpin for Add<'a>
impl<'a> UnwindSafe for Add<'a>
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