aboutsummaryrefslogtreecommitdiff
path: root/internal/plan
diff options
context:
space:
mode:
Diffstat (limited to 'internal/plan')
-rw-r--r--internal/plan/chain.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/plan/chain.go b/internal/plan/chain.go
index b32cc7d..bb4876b 100644
--- a/internal/plan/chain.go
+++ b/internal/plan/chain.go
@@ -28,6 +28,12 @@ func NewClaims() *Claims {
return &Claims{taken: claimed{}}
}
+// Claim marks path as spoken for: a later Build call of the run treats it
+// as another step's result, never displacing it (spec ยง7.4).
+func (c *Claims) Claim(path string) {
+ c.taken[path] = true
+}
+
// Input is one file and the rules that matched it, in match order.
type Input struct {
File scan.File