Artifact 8d24c0fbc30b3effe132d8dbcfec195a8d0d71b9921d2c2b2df358bbaef46d1d:
- File
src/commands.h
— part of check-in
[d74c54957c]
at
2026-11-13 05:53:44
on branch trunk
— Phase 4b-1: suit finds your projects and gives each its key
suit roots names the folders to look in. suit projects scan walks them and lists each project with its key: the remote address reduced to host and path. suit project set gives a key by hand.
git: the key is read from the project's own config file, and a linked worktree gets its project's key. Fossil: read from the checkout's database through SQLite. zit: no key from a scan; one is set by hand. The scan runs no other program, follows no symlink, and does not look inside a project for more projects.
A user name or password in a remote address never reaches suit's files or output; a test checks it.
Nothing is placed in a project yet. That is the next piece.
993 unit checks, 227 shell cases, 146 store cases, 612 placement cases and 118 project cases, under clang and under gcc 16. 100% coverage in all 18 source files. A fourth fuzz target covers the new file formats, with 297 inputs checked in. (user: dmestas, size: 765) [annotate] [blame] [check-ins using]
#ifndef SUIT_COMMANDS_H #define SUIT_COMMANDS_H // The wardrobe suit applies is named "mine". Its store holds suit.conf. #define WARDROBE_NAME "mine" // Each returns an exit code and reports on stdout and stderr. int cmd_plan(void); int cmd_apply(void); int cmd_status(void); int cmd_off(void); int cmd_run(void); // NAME is null to show the machine's name. int cmd_machine(const char *name); // VERB is null to list the roots, else "add" or "rm" with ARG the folder. ARG is changed. int cmd_roots(const char *verb, char *arg); // Show the list the last scan wrote, or with SCAN make it. int cmd_projects(bool scan); // Set (KEY given) or unset the remote key of the project at PATH by hand. PATH is changed. int cmd_project(char *path, const char *key); #endif