From 7a6c15e8ff135fc6b22b09038454d007da9642f4 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 11 Aug 2018 22:25:39 +0300 Subject: Make get-related functions to take minimum supported version as an argument --- bdep/git.txx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'bdep/git.txx') 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 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 (args)...)); finish_git (pr); } void - git_check_version (); + git_check_version (const standard_version& min_ver); template 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 (in), - forward (out), - forward (err), + return start (forward (in), forward (out), forward (err), "git", forward (args)...); } template optional - 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 (args)...)); -- cgit v1.1