pub struct Repository {
pub path: PathBuf,
}Fields§
§path: PathBufImplementations§
Source§impl Repository
impl Repository
pub fn new(path: &Path) -> Repository
pub fn clone(path: &Path, url: &str) -> Result<Repository, GitError>
pub fn git(&self, subcommand: &str, args: &[&str]) -> Result<String, GitError>
pub fn fetch(&self) -> Result<(), GitError>
Sourcepub fn get_config_keys(&self, key: &str) -> Result<Vec<String>, GitError>
pub fn get_config_keys(&self, key: &str) -> Result<Vec<String>, GitError>
Reads config keys defined with git config --add <key> <value>
pub fn set_config_key(&self, key: &str, value: &str) -> Result<(), GitError>
pub fn find_default_branch(&self) -> Result<String, GitError>
pub fn list_branches(&self) -> Result<Vec<String>, GitError>
pub fn list_branches_with_sha1s( &self, ) -> Result<Vec<(String, String)>, GitError>
pub fn list_branches_containing( &self, commit: &str, ) -> Result<Vec<String>, GitError>
pub fn list_tracking_branches(&self) -> Result<Vec<String>, GitError>
pub fn checkout(&self, branch: &str) -> Result<(), GitError>
pub fn delete_branch(&self, branch: &str) -> Result<(), GitError>
pub fn get_current_branch(&self) -> Option<String>
pub fn update_branch(&self) -> Result<(), GitError>
pub fn has_changes(&self) -> Result<bool, GitError>
pub fn get_current_sha1(&self) -> Result<String, GitError>
Auto Trait Implementations§
impl Freeze for Repository
impl RefUnwindSafe for Repository
impl Send for Repository
impl Sync for Repository
impl Unpin for Repository
impl UnsafeUnpin for Repository
impl UnwindSafe for Repository
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