Resolve check and freshen paths against the manifest's directory (closes #177) #179

Merged
clawbot merged 1 commits from issue-177-base-defaults-to-manifest-dir into next 2026-10-07 17:28:39 +02:00
Collaborator

Fixes #177.

Without --base, check and freshen now resolve a manifest's paths against the directory that holds the manifest: the file named, or the index.mf found in a directory argument. They used the current directory, so mfer check sub run from the parent reported every file missing, and mfer freshen sub/index.mf rewrote the manifest to list the parent's files. check of a manifest given by URL still uses the current directory. --base still overrides, also when it names the current directory.

Worth knowing when reading the diff:

  • The --base flag no longer has a default Value. resolveBasePath picks the directory at run time and uses cmd.IsSet to tell --base . apart from no flag, so the help states the default in words instead of printing (default: .).
  • check works out the base before a manifest URL is swapped for the temp file it is downloaded to, since that file's directory is not the base.
  • freshen cannot load a manifest from a URL, so the URL case in resolveBasePath only matters for check.
  • gen is unchanged; where it writes its manifest is open in #178.
  • The README's Tool Examples gain a freshen entry, so its default is stated there too, along with the hidden files and symlinks freshen leaves out unless given --include-dotfiles or --follow-symlinks.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/mfer/issues/177. Without `--base`, `check` and `freshen` now resolve a manifest's paths against the directory that holds the manifest: the file named, or the `index.mf` found in a directory argument. They used the current directory, so `mfer check sub` run from the parent reported every file missing, and `mfer freshen sub/index.mf` rewrote the manifest to list the parent's files. `check` of a manifest given by URL still uses the current directory. `--base` still overrides, also when it names the current directory. Worth knowing when reading the diff: - The `--base` flag no longer has a default `Value`. `resolveBasePath` picks the directory at run time and uses `cmd.IsSet` to tell `--base .` apart from no flag, so the help states the default in words instead of printing `(default: .)`. - `check` works out the base before a manifest URL is swapped for the temp file it is downloaded to, since that file's directory is not the base. - `freshen` cannot load a manifest from a URL, so the URL case in `resolveBasePath` only matters for `check`. - `gen` is unchanged; where it writes its manifest is open in https://git.eeqj.de/sneak/mfer/issues/178. - The README's Tool Examples gain a `freshen` entry, so its default is stated there too, along with the hidden files and symlinks freshen leaves out unless given `--include-dotfiles` or `--follow-symlinks`. Model: opus-5-5
clawbot added the needs-review label 2026-10-07 16:37:08 +02:00
clawbot self-assigned this 2026-10-07 16:37:08 +02:00
Author
Collaborator

Review failed. Reviewed on next at dce5e05.

  • README.md, the new mfer freshen entry under Tool Examples: it says freshen rewrites index.mf "to list the files now under the directory holding it", but by default freshen leaves out hidden files and symlinks. A tree with a hidden file then gets an EXTRA warning from the check described just above it, or a failure with --no-extra-files. Acceptable: the entry names what freshen leaves out by default (hidden files, symlinks) and the flags that include them, or it no longer claims to list every file.

Model: opus-5-5

Review failed. Reviewed on `next` at `dce5e05`. - `README.md`, the new `mfer freshen` entry under Tool Examples: it says freshen rewrites `index.mf` "to list the files now under the directory holding it", but by default freshen leaves out hidden files and symlinks. A tree with a hidden file then gets an `EXTRA` warning from the `check` described just above it, or a failure with `--no-extra-files`. Acceptable: the entry names what freshen leaves out by default (hidden files, symlinks) and the flags that include them, or it no longer claims to list every file. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-07 16:52:10 +02:00
clawbot added 1 commit 2026-10-07 17:06:23 +02:00
Without --base, check and freshen now look for a manifest's files in the
directory that holds it, the file named or the one found in a directory
argument, instead of the current directory. So `mfer check /media/drive`
checks a drive against its own index.mf from anywhere. check of a manifest
given by URL still uses the current directory, and --base still overrides,
even when it names the current directory. The --base help text of both
commands and the README's Tool Examples state the default; the README gains
a freshen entry for this, which also names the hidden files and symlinks
freshen leaves out by default and the flags that include them.

Model: opus-5-5
clawbot force-pushed issue-177-base-defaults-to-manifest-dir from a2a4d97f2f to bec03401a0 2026-10-07 17:06:23 +02:00 Compare
Author
Collaborator

The README's mfer freshen entry now names what freshen leaves out by default, hidden files and symlinks, and the flags that include them (--include-dotfiles, --follow-symlinks).

Model: opus-5-5

The README's `mfer freshen` entry now names what freshen leaves out by default, hidden files and symlinks, and the flags that include them (`--include-dotfiles`, `--follow-symlinks`). Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-07 17:06:37 +02:00
Author
Collaborator

Review passed. Gated on next at dce5e05.

Model: opus-5-5

Review passed. Gated on `next` at `dce5e05`. Model: opus-5-5
clawbot merged commit e35cd4a045 into next 2026-10-07 17:28:39 +02:00
clawbot deleted branch issue-177-base-defaults-to-manifest-dir 2026-10-07 17:28:39 +02:00
Sign in to join this conversation.