From 7c95caa8cb23bba6acfe43893ff3cf4141ac2031 Mon Sep 17 00:00:00 2001 From: Mossa Date: Sat, 16 May 2026 12:01:17 +0200 Subject: [PATCH] =?UTF-8?q?docs(spec):=20misc=20cleanups=20=E2=80=94=20whi?= =?UTF-8?q?tespace,=20capitalization,=20three-cmd=20glob?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Collected small spec edits with no behavioral content: - L29 strip trailing space on `\`init\` will create the \`dvs.toml\`. ` - L36 fix the gitignore step: it's the metadata file (and adjacent data file) being added, not "each file" — matches the actual implementation in dvs::gitignore::* - L50 drop double blank line before `## In-depth spec` - L155 capitalization `#### R Package` → `#### R package` (the other three sections already use lowercase "package") - L351 globbing section: `\`add\` and \`get\` both accept` → `\`add\`, \`status\`, \`get\` accept` (status accepts --glob too; "both" is also wrong for three operations) Carved out of #149. --- specs.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/specs.md b/specs.md index 81d0c63..d1a1207 100644 --- a/specs.md +++ b/specs.md @@ -26,14 +26,14 @@ The Rust library must not contain anything specific to the CLI or the R package: There are 4 main actions: `init`, `add`, `get` and `status`. We will see them more in details later -`init` will create the `dvs.toml`. +`init` will create the `dvs.toml`. You can pass some arguments to it or edit the toml file manually. `add` will add and update files to the storage. In practice this will: 1. hash the files (currently blake3 only) 2. save a metadata file for each files in the metadata folder -3. add each file to a `.gitignore` +3. add each metadata file to `.gitignore` that are adjacent to the files `get` will retrieve the files thanks to the metadata folder and pull them from the storage to their location in the project. @@ -47,7 +47,6 @@ A file in a `dvs` project can be in 4 states: - `absent`: metadata exists in the folder but the local file is not present - `unsynced`: local file and metadata exists but the local file differs from the metadata - ## In-depth spec ### init @@ -152,7 +151,7 @@ This will exit with `1` if one or more files could not be added to the storage ( The library automatically sets up parallelism and the only error it can return is if it couldn't set up the threadpool. It otherwise returns a list of results sorted alphabetically by path, letting users decide what to do with each. -#### R Package +#### R package ```r dvs_add(files = character(0), message, glob = NULL, dry_run = FALSE) @@ -348,7 +347,7 @@ the `add` operation to fail. ### Globbing -`add` and `get` both accept a `--glob` flag. The resolution works the following way: +`add`, `status`, `get` accept a `--glob` flag. The resolution works the following way: - Explicit files: added/retrieved directly (glob ignored) - Explicit directories with a glob: walked and filtered by glob