aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/outputs-spec.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-12 20:20:27 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-12 20:20:27 -0500
commit31875bcfb7ccbbf6e88c2cc62714a2a3794994ec (patch)
treeb3750a8c2f786afa433c0d41071478fe2a80ecc7 /src/libstore/outputs-spec.hh
parent0faf5326bd333eeef126730683dc02009a06402f (diff)
Split `OutputsSpec::merge` into `OuputsSpec::{union_, isSubsetOf}`
Additionally get rid of the evil time we made an empty `OutputSpec::Names()`.
Diffstat (limited to 'src/libstore/outputs-spec.hh')
-rw-r--r--src/libstore/outputs-spec.hh9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstore/outputs-spec.hh b/src/libstore/outputs-spec.hh
index 9211a4fc6..82dfad479 100644
--- a/src/libstore/outputs-spec.hh
+++ b/src/libstore/outputs-spec.hh
@@ -49,10 +49,11 @@ struct OutputsSpec : _OutputsSpecRaw {
bool contains(const std::string & output) const;
- /* Modify the receiver outputs spec so it is the union of it's old value
- and the argument. Return whether the output spec needed to be modified
- --- if it didn't it was already "large enough". */
- bool merge(const OutputsSpec & outputs);
+ /* Create a new OutputsSpec which is the union of this and that. */
+ OutputsSpec union_(const OutputsSpec & that) const;
+
+ /* Whether this OutputsSpec is a subset of that. */
+ bool isSubsetOf(const OutputsSpec & outputs) const;
/* Parse a string of the form 'output1,...outputN' or
'*', returning the outputs spec. */