pub struct Repo(_);
Implementations
sourceimpl Repo
impl Repo
pub fn open(path: &Path, is_worktree: bool) -> Result<Self, RepoError>
pub fn stash(&self) -> Result<(), String>
pub fn stash_pop(&self) -> Result<(), String>
pub fn rename_remote(
&self,
remote: &RemoteHandle<'_>,
new_name: &str
) -> Result<(), String>
pub fn graph_ahead_behind(
&self,
local_branch: &Branch<'_>,
remote_branch: &Branch<'_>
) -> Result<(usize, usize), String>
pub fn head_branch(&self) -> Result<Branch<'_>, String>
pub fn remote_set_url(&self, name: &str, url: &str) -> Result<(), String>
pub fn remote_delete(&self, name: &str) -> Result<(), String>
pub fn is_empty(&self) -> Result<bool, String>
pub fn is_bare(&self) -> bool
pub fn new_worktree(
&self,
name: &str,
directory: &Path,
target_branch: &Branch<'_>
) -> Result<(), String>
pub fn remotes(&self) -> Result<Vec<String>, String>
pub fn new_remote(&self, name: &str, url: &str) -> Result<(), String>
pub fn fetchall(&self) -> Result<(), String>
pub fn local_branches(&self) -> Result<Vec<Branch<'_>>, String>
pub fn fetch(&self, remote_name: &str) -> Result<(), String>
pub fn init(path: &Path, is_worktree: bool) -> Result<Self, String>
pub fn config(&self) -> Result<Config, String>
pub fn find_worktree(&self, path: &Path) -> Result<(), String>
pub fn prune_worktree(&self, name: &str) -> Result<(), String>
pub fn find_remote_branch(
&self,
remote_name: &str,
branch_name: &str
) -> Result<Branch<'_>, String>
pub fn find_local_branch(&self, name: &str) -> Result<Branch<'_>, String>
pub fn create_branch(
&self,
name: &str,
target: &Commit<'_>
) -> Result<Branch<'_>, String>
pub fn make_bare(&self, value: bool) -> Result<(), String>
pub fn convert_to_worktree(
&self,
root_dir: &Path
) -> Result<(), WorktreeConversionFailureReason>
pub fn set_config_push(
&self,
value: GitPushDefaultSetting
) -> Result<(), String>
pub fn has_untracked_files(&self, is_worktree: bool) -> Result<bool, String>
pub fn status(&self, is_worktree: bool) -> Result<RepoStatus, String>
pub fn default_branch(&self) -> Result<Branch<'_>, String>
pub fn find_remote(
&self,
remote_name: &str
) -> Result<Option<RemoteHandle<'_>>, String>
pub fn get_worktrees(&self) -> Result<Vec<Worktree>, String>
pub fn remove_worktree(
&self,
name: &str,
worktree_dir: &Path,
force: bool,
worktree_config: &Option<WorktreeRootConfig>
) -> Result<(), WorktreeRemoveFailureReason>
pub fn cleanup_worktrees(&self, directory: &Path) -> Result<Vec<String>, String>
pub fn find_unmanaged_worktrees(
&self,
directory: &Path
) -> Result<Vec<String>, String>
pub fn detect_worktree(path: &Path) -> bool
Auto Trait Implementations
impl RefUnwindSafe for Repo
impl Send for Repo
impl !Sync for Repo
impl Unpin for Repo
impl UnwindSafe for Repo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more