summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-17 13:59:52 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-17 13:59:52 +0200
commitb44222fc2b061382dc601014cde287cc41b857ca (patch)
tree3181b6d3336bb6766803a9fc0ab76e09198aa253 /docs
parent9ab6686b98499c745024a474a71e3d99b6e14973 (diff)
downloadkrino-b44222fc2b061382dc601014cde287cc41b857ca.tar.gz
krino-b44222fc2b061382dc601014cde287cc41b857ca.zip
a duplicate test in an exclude protects like one in a rule
The scopes that drive "no rule deletes a file krino found to be a duplicate" were collected from rules only. A directory whose duplicate tests lived in (exclude ...) forms had no scopes at all, so the protection never engaged: krino explain said "yes duplicate" and the next rule permanently deleted every copy. The README's promise was false in that shape, and the spec's wording permitted it. What matters is what krino knows, not which form taught it. The spec and krino.conf(5) now say so too.
Diffstat (limited to 'docs')
-rw-r--r--docs/design.md10
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/design.md b/docs/design.md
index 3037308..6299288 100644
--- a/docs/design.md
+++ b/docs/design.md
@@ -295,10 +295,12 @@ jdupes. Two rules enforce this:
1. A rule whose condition contains `(duplicate)` cannot contain a `delete`
action (§4.5).
-2. In a directory whose rules use `(duplicate)`, a file that is a duplicate
- under any of the duplicate scopes those rules use — each distinct set of
- DIRs, and the plain `(duplicate)`, looked up for the file whether or not
- evaluation reached that test — gets no delete step from any rule. The
+2. In a directory that uses `(duplicate)` — in a rule or in an `(exclude
+ ...)`, since what matters is what krino knows and not which form taught
+ it — a file that is a duplicate under any of the duplicate scopes that
+ directory uses — each distinct set of DIRs, and the plain `(duplicate)`,
+ looked up for the file whether or not evaluation reached that test —
+ gets no delete step from any rule. The
plan shows the step as "skipped: a duplicate is never deleted" and the
rest of the chain continues from the file's current path. This covers what
rule 1 cannot see: a later rule deleting through `(matched)` or through a