aboutsummaryrefslogtreecommitdiff
path: root/bdep/git.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-08-11 22:25:39 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-08-11 22:25:39 +0300
commit7a6c15e8ff135fc6b22b09038454d007da9642f4 (patch)
treef7a4454c2e1cd0c528e92c5b0f9017263d48cba9 /bdep/git.hxx
parent4a9790b9d8262f44bd42bfe9af0860873725b32b (diff)
Make get-related functions to take minimum supported version as an argument
Diffstat (limited to 'bdep/git.hxx')
-rw-r--r--bdep/git.hxx25
1 files changed, 20 insertions, 5 deletions
diff --git a/bdep/git.hxx b/bdep/git.hxx
index ca49622..6b112c8 100644
--- a/bdep/git.hxx
+++ b/bdep/git.hxx
@@ -14,31 +14,46 @@ namespace bdep
{
using butl::git_repository;
+ // All functions that start git process take the minimum supported git
+ // version as an argument.
+ //
+ // Start git process.
+ //
template <typename I, typename O, typename E, typename... A>
process
- start_git (I&& in, O&& out, E&& err, A&&... args);
+ start_git (const standard_version&, I&& in, O&& out, E&& err, A&&... args);
template <typename I, typename O, typename E, typename... A>
process
- start_git (const dir_path& repo, I&& in, O&& out, E&& err, A&&... args);
+ start_git (const standard_version&,
+ const dir_path& repo,
+ I&& in, O&& out, E&& err,
+ A&&... args);
+ // Wait git process to terminate.
+ //
void
finish_git (process& pr, bool io_read = false);
+ // Run git process.
+ //
template <typename... A>
void
- run_git (const dir_path& repo, A&&... args);
+ run_git (const standard_version&, const dir_path& repo, A&&... args);
// Return the first line of the git output. If ignore_error is true, then
// suppress stderr, ignore (normal) error exit status, and return nullopt.
//
template <typename... A>
optional<string>
- git_line (bool ignore_error, A&&... args);
+ git_line (const standard_version&, bool ignore_error, A&&... args);
template <typename... A>
optional<string>
- git_line (const dir_path& repo, bool ignore_error, A&&... args);
+ git_line (const standard_version&,
+ const dir_path& repo,
+ bool ignore_error,
+ A&&... args);
// Similar to the above but takes the already started git process with a
// redirected output pipe.