aboutsummaryrefslogtreecommitdiff
path: root/bpkg/rep-add.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-03-07 22:36:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-03-08 13:35:44 +0300
commitccd8c8dadfcfd9181772b3061e7b075d88942505 (patch)
tree2e2d292deafa3e3282128c0a92ea1b9894809e6f /bpkg/rep-add.cxx
parentd234bf4a341edb470a2c81f2533f7eb5c67c948c (diff)
Change database parameter type to transaction for some rep_*() functions
Diffstat (limited to 'bpkg/rep-add.cxx')
-rw-r--r--bpkg/rep-add.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/bpkg/rep-add.cxx b/bpkg/rep-add.cxx
index 2dcce9a..6db2c92 100644
--- a/bpkg/rep-add.cxx
+++ b/bpkg/rep-add.cxx
@@ -16,10 +16,11 @@ using namespace butl;
namespace bpkg
{
shared_ptr<repository>
- rep_add (database& db, const repository_location& rl)
+ rep_add (transaction& t, const repository_location& rl)
{
const string& rn (rl.canonical_name ());
+ database& db (t.database ());
shared_ptr<repository> r (db.find<repository> (rn));
bool updated (false);
@@ -75,7 +76,7 @@ namespace bpkg
? optional<repository_type> (o.type ())
: nullopt));
- rep_add (db, rl);
+ rep_add (t, rl);
}
t.commit ();