Trait git_stack::git::Repo

source ·
pub trait Repo {
Show 28 methods fn path(&self) -> Option<&Path>; fn user(&self) -> Option<Rc<str>>; fn push_remote(&self) -> &str; fn pull_remote(&self) -> &str; fn is_dirty(&self) -> bool; fn merge_base(&self, one: Oid, two: Oid) -> Option<Oid>; fn find_commit(&self, id: Oid) -> Option<Rc<Commit>>; fn head_commit(&self) -> Rc<Commit>; fn head_branch(&self) -> Option<Branch>; fn resolve(&self, revspec: &str) -> Option<Rc<Commit>>; fn parent_ids(&self, head_id: Oid) -> Result<Vec<Oid>>; fn commit_count(&self, base_id: Oid, head_id: Oid) -> Option<usize>; fn commit_range(
        &self,
        base_bound: Bound<&Oid>,
        head_bound: Bound<&Oid>
    ) -> Result<Vec<Oid>>; fn contains_commit(&self, haystack_id: Oid, needle_id: Oid) -> Result<bool>; fn cherry_pick(&mut self, head_id: Oid, cherry_id: Oid) -> Result<Oid>; fn reword(&mut self, head_oid: Oid, msg: &str) -> Result<Oid>; fn squash(&mut self, head_id: Oid, into_id: Oid) -> Result<Oid>; fn stash_push(&mut self, message: Option<&str>) -> Result<Oid>; fn stash_pop(&mut self, stash_id: Oid) -> Result<()>; fn branch(&mut self, name: &str, id: Oid) -> Result<()>; fn delete_branch(&mut self, name: &str) -> Result<()>; fn find_local_branch(&self, name: &str) -> Option<Branch>; fn find_remote_branch(&self, remote: &str, name: &str) -> Option<Branch>; fn local_branches(&self) -> Box<dyn Iterator<Item = Branch> + '_>; fn remote_branches(&self) -> Box<dyn Iterator<Item = Branch> + '_>; fn detach(&mut self) -> Result<()>; fn switch_branch(&mut self, name: &str) -> Result<()>; fn switch_commit(&mut self, id: Oid) -> Result<()>;
}

Required Methods§

source

fn path(&self) -> Option<&Path>

source

fn user(&self) -> Option<Rc<str>>

source

fn push_remote(&self) -> &str

source

fn pull_remote(&self) -> &str

source

fn is_dirty(&self) -> bool

source

fn merge_base(&self, one: Oid, two: Oid) -> Option<Oid>

source

fn find_commit(&self, id: Oid) -> Option<Rc<Commit>>

source

fn head_commit(&self) -> Rc<Commit>

source

fn head_branch(&self) -> Option<Branch>

source

fn resolve(&self, revspec: &str) -> Option<Rc<Commit>>

source

fn parent_ids(&self, head_id: Oid) -> Result<Vec<Oid>>

source

fn commit_count(&self, base_id: Oid, head_id: Oid) -> Option<usize>

source

fn commit_range(
    &self,
    base_bound: Bound<&Oid>,
    head_bound: Bound<&Oid>
) -> Result<Vec<Oid>>

source

fn contains_commit(&self, haystack_id: Oid, needle_id: Oid) -> Result<bool>

source

fn cherry_pick(&mut self, head_id: Oid, cherry_id: Oid) -> Result<Oid>

source

fn reword(&mut self, head_oid: Oid, msg: &str) -> Result<Oid>

source

fn squash(&mut self, head_id: Oid, into_id: Oid) -> Result<Oid>

source

fn stash_push(&mut self, message: Option<&str>) -> Result<Oid>

source

fn stash_pop(&mut self, stash_id: Oid) -> Result<()>

source

fn branch(&mut self, name: &str, id: Oid) -> Result<()>

source

fn delete_branch(&mut self, name: &str) -> Result<()>

source

fn find_local_branch(&self, name: &str) -> Option<Branch>

source

fn find_remote_branch(&self, remote: &str, name: &str) -> Option<Branch>

source

fn local_branches(&self) -> Box<dyn Iterator<Item = Branch> + '_>

source

fn remote_branches(&self) -> Box<dyn Iterator<Item = Branch> + '_>

source

fn detach(&mut self) -> Result<()>

source

fn switch_branch(&mut self, name: &str) -> Result<()>

source

fn switch_commit(&mut self, id: Oid) -> Result<()>

Implementors§