ru prune --delete no longer deletes an orphan that holds work found nowhere else, and --archive / --delete no longer touch an orphan that is a configured repo's clone left at an old path. --force overrides both. ru prune --archive / --delete now exit 1 when they keep an orphan; see the upgrade notes.
Changed
ru prune --deletekeeps orphans that hold work found nowhere else: uncommitted changes, untracked files that are not ignored, stashes, commits not on any remote-tracking branch (including a detached HEAD and repos with no remote at all), files marked assume-unchanged or skip-worktree, and linked worktrees. Each kept orphan is named with the reason. A clone git cannot open (corrupted, bare-ish, owned by another user) is kept too: an inspection error never counts as clean.--archivestill moves such orphans, since archiving loses nothing (8bb734c).ru prune --archiveand--deletekeep an orphan whoseoriginis a configured repo (compared across https, ssh and scp-style URLs,.git, ports and letter case). That is a configured repo's clone left at an old path by a layout change or anasrename, and prune reports it asclone of configured repo X ... at an old path(8bb734c).- The unsaved-work check also covers every repository inside an orphan: submodules (whose unpushed commits the outer
git statusdoes not show), the repository a deinitialized submodule leaves in.git/modules, and nested or bare repos the outer repo ignores. Notes and other local refs count as unsaved commits; files outside a sparse checkout's cone no longer count as hidden changes. Ignored files named like secrets or local state (.env, keys,*.tfstate) are listed (ignored_preciousin--json) and warned about before deletion, but do not block it. Prune does not fetch, so stale remote-tracking refs can make commits look pushed; LFS objects and reflog-only commits are not checked (a24d79a). - New
ru prune --forceincludes both kinds of kept orphan. The dry-run listing and--jsonoutput show the same notes (clone_of,unsaved_work,check_error) (8bb734c).
Upgrade notes
- Exit code change:
ru prune --archive/--deletenow exit 1 when any orphan was kept or failed to archive or delete (before: 0). Scripts that treat a nonzero exit as fatal should check the kept-orphan report, or pass--forceto archive or delete every orphan as before (an orphan that fails to archive or delete still makes the run exit 1). ru prune --deletethat used to remove every orphan now keeps the ones with unsaved work or that are clones of configured repos. The plainru prunelisting shows which orphans would be kept and why.
Installation
curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/repo_updater/main/install.sh | bashExisting installs: ru self-update. Homebrew: brew upgrade dicklesworthstone/tap/ru.
Verify (optional)
echo "$(curl -fsSL https://github.com/Dicklesworthstone/repo_updater/releases/download/v1.5.0/ru.sha256) ru" | sha256sum -c -SHA256 checksums for this release are attached as checksums.txt.
Full Changelog: v1.4.0...v1.5.0