[−][src]Struct clgit::Repository
A git repository (a reference to a local path containing a .git directory, or a bare some_repository.git directory)
Implementations
impl Repository
[src]
pub fn from_bare_repository(dir: impl Into<PathBuf>) -> Result<Self>
[src]
Examples
let repository = clgit::Repository::from_bare_repository(".git").unwrap();
pub fn from_regular_repository(dir: impl AsRef<Path>) -> Result<Self>
[src]
Examples
let repository = clgit::Repository::from_regular_repository(".").unwrap();
pub fn from_path(dir: impl AsRef<Path>) -> Result<Self>
[src]
Examples
let repository = clgit::Repository::from_path(".").unwrap(); let repository = clgit::Repository::from_path(".git").unwrap();
pub fn local_branches(&self) -> Result<impl Iterator<Item = Result<Branch>>>
[src]
Examples
for branch in repository.local_branches()? { let branch : clgit::Branch = branch?; println!("{}", branch.name().to_string_lossy()); let _ = branch.commit(); }
pub fn remote_branches(&self) -> Result<impl Iterator<Item = Result<Branch>>>
[src]
Examples
for branch in repository.remote_branches()? { let branch : clgit::Branch = branch?; println!("{}", branch.name().to_string_lossy()); let _ = branch.commit(); }
pub fn cat_file_size(&self, hash: &Hash) -> Result<u64>
[src]
Run/parse git cat-file -s [hash]
pub fn cat_file_type(&self, hash: &Hash) -> Result<FileType>
[src]
Run/parse git cat-file -t [hash]
pub fn cat_file_commit(&self, hash: &Hash) -> Result<impl Read>
[src]
Run/parse git cat-file commit [hash]
pub fn cat_file_tree(&self, hash: &Hash) -> Result<impl Read>
[src]
Run/parse git cat-file tree [hash]
pub fn cat_file_blob(&self, hash: &Hash) -> Result<impl Read>
[src]
Run/parse git cat-file blob [hash]
Trait Implementations
impl Clone for Repository
[src]
fn clone(&self) -> Repository
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Repository
[src]
impl From<Repository> for RepositoryCache
[src]
fn from(repository: Repository) -> Self
[src]
impl TryIntoSharedRepositoryCache for Repository
[src]
fn try_into_src(self) -> Result<Arc<RepositoryCache>>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Repository
impl Send for Repository
impl Sync for Repository
impl Unpin for Repository
impl UnwindSafe for Repository
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,