pub struct GitRepo { /* private fields */ }Implementations§
Source§impl GitRepo
impl GitRepo
pub fn new(path: &Path) -> Self
pub fn exists(&self) -> bool
pub fn clone(path: &Path, url: &str) -> Result<Self>
pub fn setup_upstream(&self, upstream: &GithubRepo) -> Result<()>
pub fn fetch(&self, remote: &str) -> Result<()>
pub fn upstream(&self) -> Result<Option<&'static str>>
pub fn apply_patch(&self, patches: &[&str]) -> Result<MergeType>
pub fn cherry_pick( &self, base_branch: &str, target_branch: &str, ) -> Result<MergeType>
pub fn create_branch_from( &self, template: &dyn QuestTemplate, base_branch: &str, target_branch: &str, ) -> Result<(String, MergeType)>
pub fn pull(&self) -> Result<()>
pub fn checkout_main(&self) -> Result<()>
pub fn head_commit(&self) -> Result<String>
pub fn reset(&self, branch: &str) -> Result<()>
pub fn diff(&self, base: &str, head: &str) -> Result<String>
pub fn contains_file(&self, branch: &str, file: &str) -> Result<bool>
pub fn read_file(&self, branch: &str, file: &str) -> Result<String>
pub fn show_bin(&self, branch: &str, file: &str) -> Result<Vec<u8>>
pub fn read_initial_files(&self) -> Result<HashMap<PathBuf, String>>
pub fn is_behind_origin(&self) -> Result<bool>
pub fn write_initial_files(&self, package: &QuestPackage) -> Result<()>
pub fn install_hooks(&self) -> Result<()>
Auto Trait Implementations§
impl Freeze for GitRepo
impl RefUnwindSafe for GitRepo
impl Send for GitRepo
impl Sync for GitRepo
impl Unpin for GitRepo
impl UnsafeUnpin for GitRepo
impl UnwindSafe for GitRepo
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more