aboutsummaryrefslogtreecommitdiff
path: root/bpkg
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-02-09 21:40:03 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-02-09 21:40:03 +0200
commit003a4d697b9944602418fca8c82fa244433512ea (patch)
tree43b52decef9fa110e9dcdfcb0822afbd7f558358 /bpkg
parent3e06cb9f5a8685ea5e3d4201ca622ae46a235d0e (diff)
Support comment in the repository email manifest value
Diffstat (limited to 'bpkg')
-rw-r--r--bpkg/manifest4
-rw-r--r--bpkg/manifest.cxx6
2 files changed, 7 insertions, 3 deletions
diff --git a/bpkg/manifest b/bpkg/manifest
index 6e42085..29ba6fe 100644
--- a/bpkg/manifest
+++ b/bpkg/manifest
@@ -523,13 +523,15 @@ namespace bpkg
class repository_manifest
{
public:
+ using email_type = bpkg::email;
+
repository_location location;
butl::optional<repository_role> role;
// The following values may only be present for the base repository.
//
butl::optional<std::string> url;
- butl::optional<std::string> email;
+ butl::optional<email_type> email;
butl::optional<std::string> summary;
butl::optional<std::string> description;
diff --git a/bpkg/manifest.cxx b/bpkg/manifest.cxx
index 0923a48..2cad721 100644
--- a/bpkg/manifest.cxx
+++ b/bpkg/manifest.cxx
@@ -1735,10 +1735,12 @@ namespace bpkg
if (email)
bad_name ("email redefinition");
+ string c (split_comment (v));
+
if (v.empty ())
bad_value ("empty email");
- email = move (v);
+ email = email_type (move (v), move (c));
}
else if (n == "summary")
{
@@ -1824,7 +1826,7 @@ namespace bpkg
if (!b)
bad_value ("email not allowed");
- s.next ("email", *email);
+ s.next ("email", add_comment (*email, email->comment));
}
if (summary)