Never report index.mf at the top of the base as unlisted in check (closes #229)
check / check (push) Waiting to run
check / check (push) Waiting to run
gen and fetch write the manifest as index.mf at the top of the tree. check left out only the manifest file it was given, so given a URL, or a manifest stored elsewhere, it reported that index.mf as not in the manifest, and --no-extra-files failed a tree fetch had just verified. check now drops that one report for index.mf at the top of the base directory. A manifest that lists index.mf still has it checked, and index.mf in a subdirectory or fetch's leftover .index.mf.tmp are still reported. The change is in package cli, which owns the default manifest name; the Checker in package mfer is unchanged. Model: opus-5-5
This commit was merged in pull request #232.
This commit is contained in:
@@ -195,7 +195,10 @@ func countCheckFailures(
|
||||
|
||||
// findExtraFiles reports files present on disk but absent from the
|
||||
// manifest, and anything the search cannot read: each is a failure, logged
|
||||
// at error level, under --no-extra-files, otherwise a warning.
|
||||
// at error level, under --no-extra-files, otherwise a warning. index.mf at
|
||||
// the top of the base directory is never reported as absent from the
|
||||
// manifest, even when check is given another manifest or a URL, since gen
|
||||
// and fetch write the manifest there.
|
||||
func findExtraFiles(
|
||||
ctx context.Context, cmd *cli.Command, chk *mfer.Checker, failures *int64,
|
||||
) error {
|
||||
@@ -204,6 +207,10 @@ func findExtraFiles(
|
||||
|
||||
go func() {
|
||||
for result := range extraResults {
|
||||
if result.Status == mfer.StatusExtra && result.Path == defaultManifestName {
|
||||
continue
|
||||
}
|
||||
|
||||
if cmd.Bool("no-extra-files") {
|
||||
*failures++
|
||||
|
||||
|
||||
Reference in New Issue
Block a user