aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbpkg/manifest.hxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/libbpkg/manifest.hxx b/libbpkg/manifest.hxx
index a4721d7..548312d 100644
--- a/libbpkg/manifest.hxx
+++ b/libbpkg/manifest.hxx
@@ -715,6 +715,25 @@ namespace bpkg
return url_.fragment;
}
+ bool
+ archive_based () const
+ {
+ switch (type ())
+ {
+ case repository_type::bpkg: return true;
+ case repository_type::git: return false;
+ }
+
+ assert (false); // Can't be here.
+ return false;
+ }
+
+ bool
+ version_control_based () const
+ {
+ return !archive_based ();
+ }
+
// String representation of an empty location is the empty string.
//
std::string