From 5487be65a6f493968c0e997d93bcd5c2d87158ef Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 14 Mar 2018 11:55:38 +0200 Subject: Add --no-result option to suppress printing informational messages --- bpkg/rep-add.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bpkg/rep-add.cxx') diff --git a/bpkg/rep-add.cxx b/bpkg/rep-add.cxx index 6db2c92..704da68 100644 --- a/bpkg/rep-add.cxx +++ b/bpkg/rep-add.cxx @@ -16,7 +16,9 @@ using namespace butl; namespace bpkg { shared_ptr - rep_add (transaction& t, const repository_location& rl) + rep_add (const common_options& o, + transaction& t, + const repository_location& rl) { const string& rn (rl.canonical_name ()); @@ -46,7 +48,7 @@ namespace bpkg if (added) db.update (root); - if (verb) + if (verb && !o.no_result ()) text << (added ? "added " : updated ? "updated " : "unchanged ") << rn; return r; @@ -76,7 +78,7 @@ namespace bpkg ? optional (o.type ()) : nullopt)); - rep_add (t, rl); + rep_add (o, t, rl); } t.commit (); -- cgit v1.1