pub struct GitSyncLifecycle { /* private fields */ }Expand description
Deep git workflow facade.
Implementations§
Source§impl GitSyncLifecycle
impl GitSyncLifecycle
Sourcepub async fn open(
config: GitConfig,
local_dir: &Path,
) -> Result<(Self, GitInit)>
pub async fn open( config: GitConfig, local_dir: &Path, ) -> Result<(Self, GitInit)>
Open a repository and run startup synchronization.
§Errors
Returns an error if the repository cannot be prepared or opened.
Sourcepub fn should_track(&self, path: &Path) -> bool
pub fn should_track(&self, path: &Path) -> bool
Return whether a path should be tracked.
Sourcepub async fn sync_local(&self, dirty_files: &[PathBuf]) -> Result<GitSync>
pub async fn sync_local(&self, dirty_files: &[PathBuf]) -> Result<GitSync>
Synchronize local dirty files to the Git remote.
§Errors
Returns an error if git commit or push fails with a non-domain error.
Sourcepub async fn refresh_remote(&self) -> Result<GitRefresh>
pub async fn refresh_remote(&self) -> Result<GitRefresh>
Fetch and apply remote changes.
§Errors
Returns an error if git fetch or pull fails with a non-domain error.
Sourcepub async fn refresh_remote_protected(
&self,
request: RemoteRefresh<'_>,
) -> Result<RemoteRefreshResult>
pub async fn refresh_remote_protected( &self, request: RemoteRefresh<'_>, ) -> Result<RemoteRefreshResult>
Detect remote changes, respect protected paths, and apply safe refreshes.
§Errors
Returns an error if git inspection or pull fails with a non-domain error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GitSyncLifecycle
impl !RefUnwindSafe for GitSyncLifecycle
impl Send for GitSyncLifecycle
impl Sync for GitSyncLifecycle
impl Unpin for GitSyncLifecycle
impl UnsafeUnpin for GitSyncLifecycle
impl !UnwindSafe for GitSyncLifecycle
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