pub struct RealGitClient;Expand description
Production GitClient implementation backed by real git commands.
Trait Implementations§
Source§impl GitClient for RealGitClient
impl GitClient for RealGitClient
Source§fn detect_git_info(&self, dir: PathBuf) -> GitFuture<Option<String>>
fn detect_git_info(&self, dir: PathBuf) -> GitFuture<Option<String>>
Detects the current branch name for the repository containing
dir. Read moreSource§fn find_git_repo_root(&self, dir: PathBuf) -> GitFuture<Option<PathBuf>>
fn find_git_repo_root(&self, dir: PathBuf) -> GitFuture<Option<PathBuf>>
Resolves the repository root directory that contains
dir. Read moreSource§fn create_worktree(
&self,
repo_path: PathBuf,
worktree_path: PathBuf,
branch_name: String,
base_branch: String,
) -> GitFuture<Result<(), String>>
fn create_worktree( &self, repo_path: PathBuf, worktree_path: PathBuf, branch_name: String, base_branch: String, ) -> GitFuture<Result<(), String>>
Source§fn remove_worktree(
&self,
worktree_path: PathBuf,
) -> GitFuture<Result<(), String>>
fn remove_worktree( &self, worktree_path: PathBuf, ) -> GitFuture<Result<(), String>>
Removes the existing worktree at
worktree_path. Read moreSource§fn squash_merge_diff(
&self,
repo_path: PathBuf,
source_branch: String,
target_branch: String,
) -> GitFuture<Result<String, String>>
fn squash_merge_diff( &self, repo_path: PathBuf, source_branch: String, target_branch: String, ) -> GitFuture<Result<String, String>>
Returns the staged squash-merge preview diff from
source_branch into
target_branch within repo_path. Read moreSource§fn squash_merge(
&self,
repo_path: PathBuf,
source_branch: String,
target_branch: String,
commit_message: String,
) -> GitFuture<Result<SquashMergeOutcome, String>>
fn squash_merge( &self, repo_path: PathBuf, source_branch: String, target_branch: String, commit_message: String, ) -> GitFuture<Result<SquashMergeOutcome, String>>
Performs a squash merge of
source_branch into target_branch inside
repo_path using commit_message. Read moreSource§fn rebase(
&self,
repo_path: PathBuf,
target_branch: String,
) -> GitFuture<Result<(), String>>
fn rebase( &self, repo_path: PathBuf, target_branch: String, ) -> GitFuture<Result<(), String>>
Source§fn rebase_start(
&self,
repo_path: PathBuf,
target_branch: String,
) -> GitFuture<Result<RebaseStepResult, String>>
fn rebase_start( &self, repo_path: PathBuf, target_branch: String, ) -> GitFuture<Result<RebaseStepResult, String>>
Starts a rebase onto
target_branch and reports whether it completed
immediately or stopped for conflicts. Read moreSource§fn rebase_continue(
&self,
repo_path: PathBuf,
) -> GitFuture<Result<RebaseStepResult, String>>
fn rebase_continue( &self, repo_path: PathBuf, ) -> GitFuture<Result<RebaseStepResult, String>>
Continues an in-progress rebase in
repo_path. Read moreSource§fn abort_rebase(&self, repo_path: PathBuf) -> GitFuture<Result<(), String>>
fn abort_rebase(&self, repo_path: PathBuf) -> GitFuture<Result<(), String>>
Aborts an in-progress rebase in
repo_path. Read moreSource§fn is_rebase_in_progress(
&self,
repo_path: PathBuf,
) -> GitFuture<Result<bool, String>>
fn is_rebase_in_progress( &self, repo_path: PathBuf, ) -> GitFuture<Result<bool, String>>
Returns whether rebase metadata exists in
repo_path. Read moreSource§fn has_unmerged_paths(
&self,
repo_path: PathBuf,
) -> GitFuture<Result<bool, String>>
fn has_unmerged_paths( &self, repo_path: PathBuf, ) -> GitFuture<Result<bool, String>>
Returns whether unmerged index entries remain in
repo_path. Read moreSource§fn list_staged_conflict_marker_files(
&self,
repo_path: PathBuf,
paths: Vec<String>,
) -> GitFuture<Result<Vec<String>, String>>
fn list_staged_conflict_marker_files( &self, repo_path: PathBuf, paths: Vec<String>, ) -> GitFuture<Result<Vec<String>, String>>
Source§fn list_conflicted_files(
&self,
repo_path: PathBuf,
) -> GitFuture<Result<Vec<String>, String>>
fn list_conflicted_files( &self, repo_path: PathBuf, ) -> GitFuture<Result<Vec<String>, String>>
Lists files currently marked conflicted in the index for
repo_path. Read moreSource§fn commit_all(
&self,
repo_path: PathBuf,
message: String,
no_verify: bool,
) -> GitFuture<Result<(), String>>
fn commit_all( &self, repo_path: PathBuf, message: String, no_verify: bool, ) -> GitFuture<Result<(), String>>
Source§fn commit_all_preserving_single_commit(
&self,
repo_path: PathBuf,
base_branch: String,
commit_message: String,
message_strategy: SingleCommitMessageStrategy,
no_verify: bool,
) -> GitFuture<Result<(), String>>
fn commit_all_preserving_single_commit( &self, repo_path: PathBuf, base_branch: String, commit_message: String, message_strategy: SingleCommitMessageStrategy, no_verify: bool, ) -> GitFuture<Result<(), String>>
Commits all changes while preserving one evolving session commit in
repo_path. Read moreSource§fn stage_all(&self, repo_path: PathBuf) -> GitFuture<Result<(), String>>
fn stage_all(&self, repo_path: PathBuf) -> GitFuture<Result<(), String>>
Stages all tracked and untracked changes in
repo_path. Read moreSource§fn head_commit_message(
&self,
repo_path: PathBuf,
) -> GitFuture<Result<Option<String>, String>>
fn head_commit_message( &self, repo_path: PathBuf, ) -> GitFuture<Result<Option<String>, String>>
Source§fn delete_branch(
&self,
repo_path: PathBuf,
branch_name: String,
) -> GitFuture<Result<(), String>>
fn delete_branch( &self, repo_path: PathBuf, branch_name: String, ) -> GitFuture<Result<(), String>>
Source§fn diff(
&self,
repo_path: PathBuf,
base_branch: String,
) -> GitFuture<Result<String, String>>
fn diff( &self, repo_path: PathBuf, base_branch: String, ) -> GitFuture<Result<String, String>>
Source§fn is_worktree_clean(
&self,
repo_path: PathBuf,
) -> GitFuture<Result<bool, String>>
fn is_worktree_clean( &self, repo_path: PathBuf, ) -> GitFuture<Result<bool, String>>
Returns whether the worktree in
repo_path has no local changes. Read moreSource§fn has_commits_since(
&self,
repo_path: PathBuf,
base_branch: String,
) -> GitFuture<Result<bool, String>>
fn has_commits_since( &self, repo_path: PathBuf, base_branch: String, ) -> GitFuture<Result<bool, String>>
Source§fn pull_rebase(
&self,
repo_path: PathBuf,
) -> GitFuture<Result<PullRebaseResult, String>>
fn pull_rebase( &self, repo_path: PathBuf, ) -> GitFuture<Result<PullRebaseResult, String>>
Source§fn push_current_branch(
&self,
repo_path: PathBuf,
) -> GitFuture<Result<String, String>>
fn push_current_branch( &self, repo_path: PathBuf, ) -> GitFuture<Result<String, String>>
Pushes the currently checked out branch for
repo_path and returns the
configured upstream reference after the successful push. Read moreSource§fn push_current_branch_to_remote_branch(
&self,
repo_path: PathBuf,
remote_branch_name: String,
) -> GitFuture<Result<String, String>>
fn push_current_branch_to_remote_branch( &self, repo_path: PathBuf, remote_branch_name: String, ) -> GitFuture<Result<String, String>>
Pushes the current branch for
repo_path to one explicit remote branch
name and returns the configured upstream reference after the push. Read moreSource§fn current_upstream_reference(
&self,
repo_path: PathBuf,
) -> GitFuture<Result<String, String>>
fn current_upstream_reference( &self, repo_path: PathBuf, ) -> GitFuture<Result<String, String>>
Resolves the current upstream reference for
repo_path. Read moreSource§fn fetch_remote(&self, repo_path: PathBuf) -> GitFuture<Result<(), String>>
fn fetch_remote(&self, repo_path: PathBuf) -> GitFuture<Result<(), String>>
Fetches remote refs for
repo_path. Read moreSource§fn get_ahead_behind(
&self,
repo_path: PathBuf,
) -> GitFuture<Result<(u32, u32), String>>
fn get_ahead_behind( &self, repo_path: PathBuf, ) -> GitFuture<Result<(u32, u32), String>>
Reads ahead/behind commit counts for
repo_path. Read moreSource§fn list_upstream_commit_titles(
&self,
repo_path: PathBuf,
) -> GitFuture<Result<Vec<String>, String>>
fn list_upstream_commit_titles( &self, repo_path: PathBuf, ) -> GitFuture<Result<Vec<String>, String>>
Returns commit subjects that exist in upstream but not in local
HEAD. Read moreSource§fn list_local_commit_titles(
&self,
repo_path: PathBuf,
) -> GitFuture<Result<Vec<String>, String>>
fn list_local_commit_titles( &self, repo_path: PathBuf, ) -> GitFuture<Result<Vec<String>, String>>
Returns commit subjects that exist in local
HEAD but not in upstream. Read moreAuto Trait Implementations§
impl Freeze for RealGitClient
impl RefUnwindSafe for RealGitClient
impl Send for RealGitClient
impl Sync for RealGitClient
impl Unpin for RealGitClient
impl UnsafeUnpin for RealGitClient
impl UnwindSafe for RealGitClient
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