aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/flake/flakeref.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/flake/flakeref.hh')
-rw-r--r--src/libexpr/flake/flakeref.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libexpr/flake/flakeref.hh b/src/libexpr/flake/flakeref.hh
index 6b47330a7..39e019dbd 100644
--- a/src/libexpr/flake/flakeref.hh
+++ b/src/libexpr/flake/flakeref.hh
@@ -182,6 +182,12 @@ struct FlakeRef
return std::get_if<FlakeRef::IsPath>(&data)
&& rev == Hash(rev->type);
}
+
+ /* Return true if 'other' is not less specific than 'this'. For
+ example, 'nixpkgs' contains 'nixpkgs/release-19.03', and both
+ 'nixpkgs' and 'nixpkgs/release-19.03' contain
+ 'nixpkgs/release-19.03/<hash>'. */
+ bool contains(const FlakeRef & other) const;
};
std::ostream & operator << (std::ostream & str, const FlakeRef & flakeRef);