pub struct Repo {
pub git_repo: Repository,
pub work_dir: PathBuf,
pub head: String,
pub subrepos: Vec<Repo>,
}Fields§
§git_repo: Repository§work_dir: PathBuf§head: String§subrepos: Vec<Repo>Implementations§
Source§impl Repo
impl Repo
pub fn new(work_dir: &Path, head_name: Option<&str>) -> Result<Self>
pub fn get_subrepo_by_path(&self, subrepo_path: &PathBuf) -> Option<&Repo>
pub fn sync(&self) -> Result<()>
pub fn switch(&self, head: &str) -> Result<()>
pub fn switch_force(&self, head: &str) -> Result<()>
pub fn refresh_worktree(&self) -> Result<()>
pub fn refresh_worktree_force(&self) -> Result<()>
pub fn checkout_path_from_head(&self, path: &Path) -> Result<()>
pub fn fetch(&self) -> Result<()>
pub fn ensure_on_branch(&self, branch_name: &str) -> Result<()>
pub fn ensure_on_branch_existing_or_remote( &self, branch_name: &str, create: bool, ) -> Result<()>
pub fn merge(&self, branch_name: &str) -> Result<MergeResult>
pub fn get_remote_name_for_branch(&self, branch_name: &str) -> Result<String>
Sourcepub fn get_remote_comparison(
&self,
branch_name: &str,
) -> Result<Option<RemoteComparison>>
pub fn get_remote_comparison( &self, branch_name: &str, ) -> Result<Option<RemoteComparison>>
Get the ahead/behind count relative to the remote tracking branch
pub fn remote_callbacks(&self) -> Result<RemoteCallbacks<'static>>
pub fn remote_callbacks_verbose(&self) -> Result<RemoteCallbacks<'static>>
pub fn tracking_branch( &self, branch_name: &str, ) -> Result<Option<TrackingBranch>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Repo
impl RefUnwindSafe for Repo
impl Send for Repo
impl !Sync for Repo
impl Unpin for Repo
impl UnwindSafe for Repo
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