pub struct ShellWorktreeManager { /* private fields */ }Expand description
シェルコマンドベースのGit worktree管理
Implementations§
Source§impl ShellWorktreeManager
impl ShellWorktreeManager
Sourcepub async fn init_if_needed(path: &Path) -> Result<()>
pub async fn init_if_needed(path: &Path) -> Result<()>
リポジトリを初期化(必要に応じて)
Sourcepub async fn list_worktrees(&self) -> Result<Vec<ShellWorktreeInfo>>
pub async fn list_worktrees(&self) -> Result<Vec<ShellWorktreeInfo>>
ワークツリー一覧を取得
Sourcepub async fn prune_worktrees(&self) -> Result<()>
pub async fn prune_worktrees(&self) -> Result<()>
古いワークツリーをクリーンアップ
Sourcepub async fn init_repo_if_needed(&self) -> Result<()>
pub async fn init_repo_if_needed(&self) -> Result<()>
インスタンス版の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>
簡易版のcreate_worktree (デフォルトパラメータ付き)
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>
フルパラメータ版のcreate_worktree
Sourcepub async fn remove_worktree(&self, worktree_path: &Path) -> Result<()>
pub async fn remove_worktree(&self, worktree_path: &Path) -> Result<()>
シンプル版の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 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more