Struct git_meta::GitRepo[][src]

pub struct GitRepo {
    pub url: GitUrl,
    pub head: Option<GitCommitMeta>,
    pub credentials: Option<GitCredentials>,
    pub branch: Option<String>,
    pub path: Option<PathBuf>,
}

Fields

url: GitUrlhead: Option<GitCommitMeta>credentials: Option<GitCredentials>branch: Option<String>path: Option<PathBuf>

Implementations

impl GitRepo[src]

pub fn get_remote_name(&self, r: &Repository) -> Result<String>[src]

Return the remote name from the given Repository

pub fn get_remote_branch_head_refs(
    &self,
    branch_filter: Option<Vec<String>>
) -> Result<HashMap<String, GitCommitMeta>>
[src]

impl GitRepo[src]

pub fn git_remote_from_path(path: &Path) -> Result<String>[src]

Returns the remote url after opening and validating repo from the local path

pub fn open(
    path: PathBuf,
    branch: Option<String>,
    commit_id: Option<String>
) -> Result<GitRepo>
[src]

Returns a GitRepo after parsing metadata from a repo If branch is not provided, current checked out branch will be used If commit id is not provided, the HEAD of the branch will be used

pub fn with_path(mut self: Self, path: PathBuf) -> Self[src]

pub fn with_branch<S: Into<String>>(mut self: Self, branch: S) -> Self[src]

pub fn with_commit(mut self: Self, commit: Commit<'_>) -> Self[src]

pub fn with_credentials(mut self: Self, creds: GitCredentials) -> Self[src]

pub fn new<S: AsRef<str>>(url: S) -> Result<GitRepo>[src]

pub fn build_git2_remotecallback(&self) -> RemoteCallbacks<'_>[src]

Trait Implementations

impl Clone for GitRepo[src]

impl Debug for GitRepo[src]

impl Default for GitRepo[src]

impl From<GitRepo> for GitRepoCloner[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<D> OwoColorize for D

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.