aboutsummaryrefslogtreecommitdiff
path: root/bdep/git.txx
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.txx
parent4a9790b9d8262f44bd42bfe9af0860873725b32b (diff)
Make get-related functions to take minimum supported version as an argument
Diffstat (limited to 'bdep/git.txx')
-rw-r--r--bdep/git.txx26
1 files changed, 13 insertions, 13 deletions
diff --git a/bdep/git.txx b/bdep/git.txx
index aef5f3d..19a9d42 100644
--- a/bdep/git.txx
+++ b/bdep/git.txx
@@ -6,41 +6,41 @@ namespace bdep
{
template <typename... A>
void
- run_git (const dir_path& repo, A&&... args)
+ run_git (const standard_version& min_ver, const dir_path& repo, A&&... args)
{
- process pr (start_git (repo,
- 0 /* stdin */,
- 1 /* stdout */,
- 2 /* stderr */,
+ process pr (start_git (min_ver,
+ repo,
+ 0 /* stdin */, 1 /* stdout */, 2 /* stderr */,
forward<A> (args)...));
finish_git (pr);
}
void
- git_check_version ();
+ git_check_version (const standard_version& min_ver);
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& min_ver,
+ I&& in, O&& out, E&& err,
+ A&&... args)
{
- git_check_version ();
+ git_check_version (min_ver);
- return start (forward<I> (in),
- forward<O> (out),
- forward<E> (err),
+ return start (forward<I> (in), forward<O> (out), forward<E> (err),
"git",
forward<A> (args)...);
}
template <typename... A>
optional<string>
- git_line (bool ie, A&&... args)
+ git_line (const standard_version& min_ver, bool ie, A&&... args)
{
fdpipe pipe (fdopen_pipe ());
auto_fd null (ie ? fdnull () : auto_fd ());
- process pr (start_git (0 /* stdin */,
+ process pr (start_git (min_ver,
+ 0 /* stdin */,
pipe /* stdout */,
ie ? null.get () : 2 /* stderr */,
forward<A> (args)...));