pub struct CodexRepository { /* private fields */ }
Expand description
A CodexRepository
is a Git Repository that is managed by this crate. It tracks whether the repository needs to be committed or pushed.
Implementations§
Source§impl CodexRepository
impl CodexRepository
Sourcepub fn new(repo: Repository, config: &CodexRepoConfig) -> Self
pub fn new(repo: Repository, config: &CodexRepoConfig) -> Self
initialise the repository based on the CodexRepoConfig.
Sourcepub fn commit_and_push(&mut self) -> Result<()>
pub fn commit_and_push(&mut self) -> Result<()>
commit_and_push
commits changes and pushes them
Sourcepub fn commit(&mut self) -> NullResult
pub fn commit(&mut self) -> NullResult
commit
commits any changes to the local repository.
Sourcepub fn add(&mut self, path: PathBuf) -> NullResult
pub fn add(&mut self, path: PathBuf) -> NullResult
add
adds a file to the index
Sourcepub fn push(&mut self, force: bool) -> NullResult
pub fn push(&mut self, force: bool) -> NullResult
push
tries to push any local changes to the remote.
Trait Implementations§
Source§impl Debug for CodexRepository
impl Debug for CodexRepository
Source§impl Display for CodexRepository
impl Display for CodexRepository
Auto Trait Implementations§
impl Freeze for CodexRepository
impl RefUnwindSafe for CodexRepository
impl Send for CodexRepository
impl !Sync for CodexRepository
impl Unpin for CodexRepository
impl UnwindSafe for CodexRepository
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