diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-08-06 22:15:05 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-08-07 15:14:44 +0300 |
commit | 4f2d4022dca65da2a6f03e1f27df13deeaab360a (patch) | |
tree | 7fe826041792c7e51792283f28ee29c1744e04f9 /bdep/publish.cxx | |
parent | 228a2dfec33eb9ba966894bd23c2f4db51a7e330 (diff) |
Add git version check (2.12 is minimum supported)
Diffstat (limited to 'bdep/publish.cxx')
-rw-r--r-- | bdep/publish.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bdep/publish.cxx b/bdep/publish.cxx index 3650381..40a1724 100644 --- a/bdep/publish.cxx +++ b/bdep/publish.cxx @@ -44,7 +44,7 @@ namespace bdep static url control_url (const dir_path& prj) { - if (git (prj)) + if (git_repository (prj)) { // First try remote.origin.build2ControlUrl which can be used to specify // a custom URL (e.g., if a correct one cannot be automatically derived @@ -890,7 +890,7 @@ namespace bdep // // See if this is a VCS repository we recognize. // - if (ctrl && git (prj)) + if (ctrl && git_repository (prj)) { // Checkout the build2-control branch into a separate working tree not // to interfere with the user's stuff. @@ -919,10 +919,10 @@ namespace bdep bool q (verb < 2); auto_fd null (q ? fdnull () : auto_fd ()); - process pr (start_git (0 /* stdin */, + process pr (start_git (prj, + 0 /* stdin */, q ? null.get () : 1 /* stdout */, q ? null.get () : 2 /* stderr */, - prj, "worktree", "add", wd, @@ -1003,15 +1003,15 @@ namespace bdep auto_fd null (fdnull ()); fdpipe pipe (fdopen_pipe ()); - process pr (start_git (null.get () /* stdin */, + process pr (start_git (prj, + null.get () /* stdin */, pipe /* stdout */, 2 /* stderr */, - prj, "hash-object", "-wt", "tree", "--stdin")); - optional<string> tree (git_line (move (pr), move (pipe))); + optional<string> tree (git_line (move (pr), move (pipe), false)); if (!tree) fail << "unable to create git tree object for build2-control"; |