pub struct ShellWorktreeManager { /* private fields */ }Expand description
Shell command-based Git worktree management
Implementations§
Source§impl ShellWorktreeManager
impl ShellWorktreeManager
Sourcepub fn is_git_available() -> bool
pub fn is_git_available() -> bool
Check if git is available on the system
Sourcepub async fn init_if_needed(path: &Path) -> Result<()>
pub async fn init_if_needed(path: &Path) -> Result<()>
Initialize repository (if needed)
Sourcepub async fn list_worktrees(&self) -> Result<Vec<ShellWorktreeInfo>>
pub async fn list_worktrees(&self) -> Result<Vec<ShellWorktreeInfo>>
Get list of worktrees
Sourcepub async fn prune_worktrees(&self) -> Result<()>
pub async fn prune_worktrees(&self) -> Result<()>
Clean up old worktrees
Sourcepub async fn init_repo_if_needed(&self) -> Result<()>
pub async fn init_repo_if_needed(&self) -> Result<()>
Instance version of init_if_needed
Sourcepub async fn create_worktree(
&self,
worktree_path: &Path,
branch_name: &str,
) -> Result<ShellWorktreeInfo>
pub async fn create_worktree( &self, worktree_path: &Path, branch_name: &str, ) -> Result<ShellWorktreeInfo>
Simple version of create_worktree (with default parameters)
Sourcepub async fn create_worktree_full(
&self,
worktree_path: &Path,
branch_name: &str,
create_new_branch: bool,
) -> Result<ShellWorktreeInfo>
pub async fn create_worktree_full( &self, worktree_path: &Path, branch_name: &str, create_new_branch: bool, ) -> Result<ShellWorktreeInfo>
Full parameter version of create_worktree
Sourcepub async fn remove_worktree(&self, worktree_path: &Path) -> Result<()>
pub async fn remove_worktree(&self, worktree_path: &Path) -> Result<()>
Simple version of remove_worktree
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShellWorktreeManager
impl RefUnwindSafe for ShellWorktreeManager
impl Send for ShellWorktreeManager
impl Sync for ShellWorktreeManager
impl Unpin for ShellWorktreeManager
impl UnsafeUnpin for ShellWorktreeManager
impl UnwindSafe for ShellWorktreeManager
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