aboutsummaryrefslogtreecommitdiff
path: root/bpkg/options-types.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-01-11 21:39:15 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-01-12 13:07:30 +0300
commitdb4a9915b25ab682762eb73d65aab44e6bddcc1f (patch)
treea4be1c133feb07948dff504abb5e4f9cf9defe84 /bpkg/options-types.hxx
parent01c179eed3fcfccc7cdd262742935177dfcf5106 (diff)
Add --git-capabilities common option
Diffstat (limited to 'bpkg/options-types.hxx')
-rw-r--r--bpkg/options-types.hxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/bpkg/options-types.hxx b/bpkg/options-types.hxx
index 6576060..30d52a0 100644
--- a/bpkg/options-types.hxx
+++ b/bpkg/options-types.hxx
@@ -8,6 +8,8 @@
#include <cassert>
#include <utility> // move()
+#include <libbutl/prefix-map.hxx>
+
#include <bpkg/types.hxx>
namespace bpkg
@@ -27,6 +29,17 @@ namespace bpkg
json
};
+ enum class git_protocol_capabilities
+ {
+ dumb, // No shallow clone support.
+ smart, // Support for shallow clone, but not for unadvertised refs fetch.
+ unadv // Support for shallow clone and for unadvertised refs fetch.
+ };
+
+ using git_capabilities_map = butl::prefix_map<string,
+ git_protocol_capabilities,
+ '/'>;
+
// Qualified options.
//
// An option that uses this type can have its values qualified using the