R288 Keep nothing but main checkouts in the directory for main checkouts
Keep nothing but main checkouts directly under ~/src.
Reason
A script that walks the directory and takes each entry for a repository needs a special case for every stray file or directory, and what lies there stray has no owner, so nobody dares delete it (Art. III §4).
Verification
A main checkout is a clone whose .git is a directory; a worktree’s .git is a file, so a worktree is not one.
Every entry directly under ~/src is a directory whose .git is a directory. Each line this command prints is an entry that does not belong there:
sh
find ~/src -mindepth 1 -maxdepth 1 -exec sh -c ‘[ -d “$1/.git” ] || echo “STRAY: $1”’ _ {} ;
Only whether it prints anything counts; the number of entries under the directory changes all the time and is no criterion.
Violated when the directory holds an entry that is not a main checkout.