Skip to main content

worktree_remove_clean

Function worktree_remove_clean 

Source
pub async fn worktree_remove_clean(repo: &Path, path: &Path) -> Result<bool>
Expand description

Remove a worktree only if git finds it clean: no --force, so a change made after the caller last looked is refused rather than thrown away. Ignored files (target/) do not count as changes and go with it.