pub struct LocalWorktreeManager {
pub default_timeout: Duration,
}Expand description
Local worktree manager using git CLI commands.
Fields§
§default_timeout: DurationDefault timeout for git commands.
Implementations§
Source§impl LocalWorktreeManager
impl LocalWorktreeManager
pub fn new() -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Trait Implementations§
Source§impl Clone for LocalWorktreeManager
impl Clone for LocalWorktreeManager
Source§fn clone(&self) -> LocalWorktreeManager
fn clone(&self) -> LocalWorktreeManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LocalWorktreeManager
impl Debug for LocalWorktreeManager
Source§impl Default for LocalWorktreeManager
impl Default for LocalWorktreeManager
Source§impl WorktreeManager for LocalWorktreeManager
impl WorktreeManager for LocalWorktreeManager
Source§async fn create(
&self,
binding: &mut WorktreeBinding,
cancel: CancellationToken,
) -> Result<(), GitError>
async fn create( &self, binding: &mut WorktreeBinding, cancel: CancellationToken, ) -> Result<(), GitError>
Create a worktree from a base ref (Section 12.2). Read more
Source§async fn is_dirty(&self, worktree_path: &Path) -> Result<bool, GitError>
async fn is_dirty(&self, worktree_path: &Path) -> Result<bool, GitError>
Check whether a worktree has uncommitted changes.
Source§async fn resolve_head(&self, worktree_path: &Path) -> Result<String, GitError>
async fn resolve_head(&self, worktree_path: &Path) -> Result<String, GitError>
Get the current HEAD SHA for a worktree.
Source§async fn resolve_ref(
&self,
repo_root: &Path,
refspec: &str,
) -> Result<String, GitError>
async fn resolve_ref( &self, repo_root: &Path, refspec: &str, ) -> Result<String, GitError>
Resolve a ref (branch name, tag, or SHA) to a full SHA in the repo.
Source§async fn detect_interrupted(
&self,
worktree_path: &Path,
) -> Result<Option<InterruptedOp>, GitError>
async fn detect_interrupted( &self, worktree_path: &Path, ) -> Result<Option<InterruptedOp>, GitError>
Detect interrupted git operations by checking sentinel files (Section 12.10).
Source§async fn recover(
&self,
binding: &mut WorktreeBinding,
action: RecoveryAction,
cancel: CancellationToken,
) -> Result<(), GitError>
async fn recover( &self, binding: &mut WorktreeBinding, action: RecoveryAction, cancel: CancellationToken, ) -> Result<(), GitError>
Recover from an interrupted operation (Section 12.10).
Source§fn validate_path_confinement(
&self,
path: &Path,
worktree_root: &Path,
) -> Result<(), GitError>
fn validate_path_confinement( &self, path: &Path, worktree_root: &Path, ) -> Result<(), GitError>
Validate that a path is confined within the worktree root (Section 12.3).
Source§async fn validate_git_indirection(
&self,
worktree_path: &Path,
) -> Result<(), GitError>
async fn validate_git_indirection( &self, worktree_path: &Path, ) -> Result<(), GitError>
Validate the .git indirection file in a worktree (Section 12.2 step 5).
Source§async fn submodule_status_hash(
&self,
worktree_path: &Path,
) -> Result<String, GitError>
async fn submodule_status_hash( &self, worktree_path: &Path, ) -> Result<String, GitError>
Compute a hash of
git submodule status output for change detection.Source§async fn submodule_status(
&self,
worktree_path: &Path,
) -> Result<Vec<SubmoduleEntry>, GitError>
async fn submodule_status( &self, worktree_path: &Path, ) -> Result<Vec<SubmoduleEntry>, GitError>
Parse
git submodule status into structured entries (Section 12.4).Source§async fn check_uninitialized_submodules(
&self,
worktree_path: &Path,
) -> Result<Vec<String>, GitError>
async fn check_uninitialized_submodules( &self, worktree_path: &Path, ) -> Result<Vec<String>, GitError>
Check for uninitialized submodules. Returns paths of uninitialized submodules.
Source§async fn check_dirty_submodules(
&self,
worktree_path: &Path,
) -> Result<Vec<String>, GitError>
async fn check_dirty_submodules( &self, worktree_path: &Path, ) -> Result<Vec<String>, GitError>
Check for dirty (modified/conflicted) submodules. Returns paths of dirty submodules.
Source§fn verify_submodule_policy(
&self,
mode: SubmoduleMode,
before: &[SubmoduleEntry],
after: &[SubmoduleEntry],
) -> Result<(), GitError>
fn verify_submodule_policy( &self, mode: SubmoduleMode, before: &[SubmoduleEntry], after: &[SubmoduleEntry], ) -> Result<(), GitError>
Verify submodule policy between before/after states (Section 12.4). Read more
Source§async fn cleanup(
&self,
binding: &mut WorktreeBinding,
delete_branch: bool,
cancel: CancellationToken,
) -> Result<(), GitError>
async fn cleanup( &self, binding: &mut WorktreeBinding, delete_branch: bool, cancel: CancellationToken, ) -> Result<(), GitError>
Remove the worktree and optionally its branch (Section 12.11).
Auto Trait Implementations§
impl Freeze for LocalWorktreeManager
impl RefUnwindSafe for LocalWorktreeManager
impl Send for LocalWorktreeManager
impl Sync for LocalWorktreeManager
impl Unpin for LocalWorktreeManager
impl UnsafeUnpin for LocalWorktreeManager
impl UnwindSafe for LocalWorktreeManager
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<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request