Skip to main content

clean_changes_worktree

Function clean_changes_worktree 

Source
pub fn clean_changes_worktree(region: &CleanRegion) -> bool
Expand description

What: Whether the clean can delete files. &CleanRegion borrows the facts. Why: Every unlink and rmdir in Git’s clean is skipped under dry run, also after the interactive menu chose what to delete (builtin/clean.c:191, 223, 267, 1050-1078). Gotcha: Divergence from the incumbent, which treated every interactive clean as deleting: git clean -i -n deletes nothing in Git 2.56.0.

In TS you’d write (pseudocode):

function cleanChangesWorktree(region: CleanRegion): boolean;