pub fn dirty_source(
git_dir: &Path,
common_dir: &Path,
why: CleanRefusal,
) -> Result<DirtySource, CleanRefusal>Expand description
What:
For a worktree check_clean refused with the ordinary change why, what HEAD names, or the refusal that a restore
cannot undo when the index holds one anywhere.
Why:
The first refusal hides the rest: a staged edit can come before a submodule or a skip-worktree entry, and only a look at
every entry tells a change a reset undoes from a state it does not.
In TS you’d write (pseudocode):
function dirtySource(args: { gitDir: string; commonDir: string; why: CleanRefusal }): DirtySource; // throws a CleanRefusal