A leftover folder refuses a new repository's name, and says so
createRepo claims the repository's directory with a plain mkdir before git runs. When the
directory is already there but no repository row owns it (a create still under way, or a folder
left behind), the create is refused as dir_in_the_way, not name_taken: no repository has that
name, so "already has a repository by that name" would send the person looking for one that is
not there.
- The web (
/new,newRepoSubmitinsrc/web/pages/site.ts) showsREPO_DIR_IN_THE_WAYfromsrc/actions/repo_words.tsbeside the Name field: "No repository has that name, but a folder on the forge's disk already holds it … Pick another name: this one stays held until that folder is removed from the disk." - The terminal (both doors): the new-repository screen (
src/tui/screens/newrepo.ts) shows the refusal as a danger toast, worded bydir_in_the_wayin the messages ofsrc/tui/screens/common.ts: "a folder on disk already holds that name, with no repository behind it: pick another".
Deleting a base repository now also removes its sealed repositories' directories, so a delete leaves no such leftover behind.
Try it: with a folder already under the owner's repository directory and no repository by that
name, open /new, give that name and submit; the message above sits beside Name. In the terminal,
press the new-repository key and give the same name.
Pinned by test/repo-borrowers.test.ts (a leftover directory, and two creates racing for one name,
both answer dir_in_the_way).