R216 Keep nothing but main checkouts in the root for main checkouts
Superseded by R288 Keep nothing but main checkouts in the directory for main checkouts.
Keep nothing but main checkouts directly under the root the jurisdiction designates for main checkouts.
Reason
A script that walks the root 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. The jurisdiction designates the root, for example in a rule of a lower layer.
Every entry directly under the root is a directory whose .git is a directory. Each line this command prints, with the root in place of <root>, is an entry that does not belong there:
find <root> -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 root changes all the time and is no criterion.
Violated when the root holds an entry that is not a main checkout.