Skip to main content

absorb

Function absorb 

Source
pub fn absorb(
    source: Option<Utf8PathBuf>,
    target: Utf8PathBuf,
    dry_run: bool,
    yes: bool,
) -> Result<()>
Expand description

Manually absorb a single target file back into source.

Used when apply has skipped an anomaly ([absorb] on_anomaly = "skip" or non-TTY ask) but the user has decided that target is right. Bypasses policy + git-clean checks: this is an explicit user request.

Always prints a unified diff (source vs target) to stderr first. Without --yes, requires interactive y/N confirmation on a TTY, and refuses to act off-TTY (so a CI script can’t silently rewrite source). --dry-run shows the diff and exits.

Walks [[mount.entry]] and .yuilink overrides to find which source path “owns” the given target. Errors loudly if no mount claims it.