pub struct GitCommandRunner { /* private fields */ }Expand description
Production implementation of git operations
Implementations§
Source§impl GitCommandRunner
impl GitCommandRunner
Sourcepub fn new(process_runner: Arc<dyn ProcessRunner>) -> Self
pub fn new(process_runner: Arc<dyn ProcessRunner>) -> Self
Create a new GitCommandRunner
Trait Implementations§
Source§impl GitReader for GitCommandRunner
impl GitReader for GitCommandRunner
Source§fn is_repository<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = LibResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_repository<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = LibResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if a directory is a git repository
Source§fn get_status<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = LibResult<GitStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_status<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = LibResult<GitStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get git status for the repository
Source§fn get_current_branch<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = LibResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_current_branch<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = LibResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the current branch name
Source§fn get_commit_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 Path,
ref_: &'life2 str,
) -> Pin<Box<dyn Future<Output = LibResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_commit_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 Path,
ref_: &'life2 str,
) -> Pin<Box<dyn Future<Output = LibResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get commit message by reference
Source§fn list_files<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = LibResult<Vec<PathBuf>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_files<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = LibResult<Vec<PathBuf>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all files tracked by git
Source§fn get_diff<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
path: &'life1 Path,
from: &'life2 str,
to: &'life3 str,
) -> Pin<Box<dyn Future<Output = LibResult<GitDiff>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_diff<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
path: &'life1 Path,
from: &'life2 str,
to: &'life3 str,
) -> Pin<Box<dyn Future<Output = LibResult<GitDiff>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Get diff between two references
Source§impl GitWorktree for GitCommandRunner
impl GitWorktree for GitCommandRunner
Source§fn create_worktree<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repo: &'life1 Path,
name: &'life2 str,
path: &'life3 Path,
) -> Pin<Box<dyn Future<Output = LibResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn create_worktree<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repo: &'life1 Path,
name: &'life2 str,
path: &'life3 Path,
) -> Pin<Box<dyn Future<Output = LibResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Create a new worktree
Source§fn remove_worktree<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo: &'life1 Path,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = LibResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn remove_worktree<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo: &'life1 Path,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = LibResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Remove a worktree
Source§impl GitWriter for GitCommandRunner
impl GitWriter for GitCommandRunner
Source§fn init_repository<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = LibResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn init_repository<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = LibResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Initialize a new git repository
Source§fn stage_files<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 Path,
files: &'life2 [PathBuf],
) -> Pin<Box<dyn Future<Output = LibResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn stage_files<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 Path,
files: &'life2 [PathBuf],
) -> Pin<Box<dyn Future<Output = LibResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Stage specific files
Source§fn stage_all<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = LibResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stage_all<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = LibResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stage all changes
Source§fn commit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 Path,
message: &'life2 str,
) -> Pin<Box<dyn Future<Output = LibResult<CommitId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn commit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 Path,
message: &'life2 str,
) -> Pin<Box<dyn Future<Output = LibResult<CommitId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create a commit with message
Source§fn create_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 Path,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = LibResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 Path,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = LibResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create a new branch
Auto Trait Implementations§
impl !RefUnwindSafe for GitCommandRunner
impl !UnwindSafe for GitCommandRunner
impl Freeze for GitCommandRunner
impl Send for GitCommandRunner
impl Sync for GitCommandRunner
impl Unpin for GitCommandRunner
impl UnsafeUnpin for GitCommandRunner
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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