Repo lists can now group related repos under a subfolder, and ru prune no longer treats a configured repo as an orphan when its path is spelled differently or its list cannot be read. Also fixes the stash-and-pull hint that could pop an unrelated older stash.
Added
- Group repos under a subfolder with
in <group>(GH #16). A repo line such asowner/repo in workputs the clone in a folder between the layout prefix and the repo folder, for every layout:flatgives$PROJECTS_DIR/work/repo,owner-repogives$PROJECTS_DIR/owner/work/repo,fullgives$PROJECTS_DIR/host/owner/work/repo. Groups can be nested (in a/b), andinandascan appear in either order; inside a group,asrenames only the repo folder.ru add --group NAMEwrites thein NAMEform andru importkeeps groups. A repo listed twice with the same folder name in different groups is cloned once, with a warning, and ru refuses to clone into a folder that sits inside another repo's working tree (dd210a6). antigravity/agyagent types map to ntm's--agyflags for ru-driven sessions (e84763f).
Fixed
- The stash-and-pull hint could apply and drop an unrelated older stash (GH #15). ru counts untracked files as dirty, but
git stashdoes not save them, so the suggestedgit stash && git pull && git stash popstashed nothing and then popped whatever stash was already on top. The conflict report now suggestsgit pull --autostash, which only restores a stash it created (0d1813d). ru prunecould report, archive or delete configured repos as orphans when the configured path and the clone on disk were spelled differently: an owner folder reached through a symlink, a different letter case on a case-insensitive filesystem (macOS), a different Unicode normalization of the same name, or aPROJECTS_DIRwith a trailing slash. Prune now compares physical, case-folded paths and then file identity (device and inode), so a clone that is the same folder as a configured path is never an orphan (dbf455e, e243a98, ed42656).ru prune --archive/--deletenow refuse (exit 4) when they cannot know the full configured set: a list line that cannot be resolved, an unreadable list file, arepos.ddirectory that is missing or cannot be listed, a dangling symlinked list, or no configured repos at all. Before, every clone such a list names was treated as an orphan. The dry-run listing is unchanged (dbf455e, e243a98, 20b37e2, ed42656).- Prune never acts on a repo that contains configured repos, never on fragments of a folder name that contains a newline, and only scans one level deeper inside group folders rather than across the whole projects directory (c5af33c, e243a98).
- Archiving two same-named orphans in the same second (
owner-a/tool,owner-b/tool) moved the second into the first one's working tree. Each archive now gets its own_1,_2, ... suffix (20b37e2). - Repo specs whose name still contains whitespace after parsing (
owner/repo in a in b) are rejected instead of resolving to a folder namedrepo in a(c5af33c). - README: removed the Scoop install instructions. ru is a bash script and there is no Scoop manifest; Windows users should use WSL2 with Homebrew or the install script (b5fe013).
Upgrade notes
- Scripts that run
ru prune --deleteor--archiveright afterru init, or with a list that fails to parse, now get exit code 4 instead of a prune. - A list line that an older ru accepted but that is now rejected (for example
owner/repo as x as y) makes destructive prune modes refuse until the line is fixed;ru prunewithout flags lists it.
Installation
curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/repo_updater/main/install.sh | bashExisting installs: ru self-update.
Verify (optional)
echo "$(curl -fsSL https://github.com/Dicklesworthstone/repo_updater/releases/download/v1.4.0/ru.sha256) ru" | sha256sum -c -SHA256 checksums for this release are attached as checksums.txt.
Full Changelog: v1.3.1...v1.4.0