Skip to main content

SourceRepo

Struct SourceRepo 

Source
pub struct SourceRepo { /* private fields */ }

Implementations§

Source§

impl SourceRepo

Source

pub fn discover(start: &Path) -> OutpostResult<Self>

Source

pub fn discover_with( start: &Path, env: &BTreeMap<OsString, OsString>, ) -> OutpostResult<Self>

Source

pub fn at(path: impl Into<PathBuf>) -> OutpostResult<Self>

Source

pub fn at_with( path: impl Into<PathBuf>, env: &BTreeMap<OsString, OsString>, ) -> OutpostResult<Self>

Source

pub fn work_tree(&self) -> &Path

Source

pub fn git_dir(&self) -> &Path

Source

pub fn git_common_dir(&self) -> &Path

Source

pub fn outpost_at(&self, path: &Path) -> OutpostResult<Outpost>

Source

pub fn env(&self) -> &BTreeMap<OsString, OsString>

Source

pub fn current_branch(&self) -> OutpostResult<BranchName>

Source

pub fn checked_out_branches(&self) -> OutpostResult<Vec<BranchName>>

Source

pub fn checked_out_worktree_for( &self, branch: &BranchName, ) -> OutpostResult<Option<PathBuf>>

Source

pub fn is_dirty(&self) -> OutpostResult<bool>

Source

pub fn upstream_for( &self, branch: &BranchName, ) -> OutpostResult<Option<UpstreamRef>>

Source

pub fn remote_url(&self, remote: &RemoteName) -> OutpostResult<String>

Source

pub fn branch_exists(&self, branch: &BranchName) -> OutpostResult<bool>

Source

pub fn branch_oid(&self, branch: &BranchName) -> OutpostResult<Option<String>>

Source

pub fn origin_branch_oid( &self, branch: &BranchName, ) -> OutpostResult<Option<String>>

Source

pub fn remote_branch_oid( &self, remote: &RemoteName, branch: &BranchName, ) -> OutpostResult<Option<String>>

Source

pub fn origin_default_branch(&self) -> OutpostResult<Option<BranchName>>

Source

pub fn remote_default_branch( &self, remote: &RemoteName, ) -> OutpostResult<Option<BranchName>>

Source

pub fn fetch_origin_default_branch( &self, ) -> OutpostResult<Option<(BranchName, String)>>

Source

pub fn fetch_remote_default_branch( &self, remote: &RemoteName, ) -> OutpostResult<Option<(BranchName, String)>>

Source

pub fn is_ancestor_oid( &self, ancestor: &str, descendant: &str, ) -> OutpostResult<bool>

Source

pub fn is_branch_checked_out(&self, branch: &BranchName) -> OutpostResult<bool>

Source

pub fn delete_branch_if_oid( &self, branch: &BranchName, expected_oid: &str, ) -> OutpostResult<()>

Source

pub fn delete_origin_branch_if_oid( &self, branch: &BranchName, expected_oid: &str, ) -> OutpostResult<()>

Source

pub fn delete_remote_branch_if_oid( &self, remote: &RemoteName, branch: &BranchName, expected_oid: &str, ) -> OutpostResult<()>

Source

pub fn fast_forward_branch_from_origin( &self, branch: &BranchName, ) -> OutpostResult<()>

Source

pub fn registry_path(&self) -> PathBuf

Source

pub fn registry(&self) -> OutpostResult<Registry>

Source

pub fn registry_mut(&self) -> OutpostResult<RegistryMut<'_>>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.