pub struct GitSubmoduleEditor { /* private fields */ }Implementations§
Source§impl GitSubmoduleEditor
impl GitSubmoduleEditor
pub fn new(root: PathBuf) -> Self
pub fn set_offline(&mut self, offline: bool)
pub fn fetch_submodule(path: &Path) -> Result<(), ()>
pub fn rebase_submodule(path: &Path) -> Result<(), String>
pub fn push_submodule(path: &Path) -> Result<(), String>
Sourcepub fn update_parent_pointer(
root: &Path,
sm_path: &Path,
name: &str,
) -> Result<(), Box<dyn Error>>
pub fn update_parent_pointer( root: &Path, sm_path: &Path, name: &str, ) -> Result<(), Box<dyn Error>>
用 git2 更新父仓库的子模块指针并提交。
pub fn push_parent(root: &Path) -> Result<(), String>
Sourcepub fn revert_parent_commit(root: &Path)
pub fn revert_parent_commit(root: &Path)
用 git2 回滚最近一次提交(git reset --hard HEAD~1)。
pub fn root(&self) -> &Path
pub fn sync_to_parent(&self, name: &str) -> Result<(), Box<dyn Error>>
pub fn sync_all_to_parent(&self) -> Result<(), Box<dyn Error>>
pub fn status(&self) -> Result<Vec<HealthIssue>, Box<dyn Error>>
Auto Trait Implementations§
impl Freeze for GitSubmoduleEditor
impl RefUnwindSafe for GitSubmoduleEditor
impl Send for GitSubmoduleEditor
impl Sync for GitSubmoduleEditor
impl Unpin for GitSubmoduleEditor
impl UnsafeUnpin for GitSubmoduleEditor
impl UnwindSafe for GitSubmoduleEditor
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