// file : bdep/git.txx -*- C++ -*- // copyright : Copyright (c) 2014-2018 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file namespace bdep { template void run_git (const semantic_version& min_ver, const dir_path& repo, A&&... args) { process pr (start_git (min_ver, repo, 0 /* stdin */, 1 /* stdout */, 2 /* stderr */, forward (args)...)); finish_git (pr); } void git_check_version (const semantic_version& min_ver); template process start_git (const semantic_version& min_ver, I&& in, O&& out, E&& err, A&&... args) { git_check_version (min_ver); return start (forward (in), forward (out), forward (err), "git", forward (args)...); } template optional git_line (const semantic_version& min_ver, bool ie, A&&... args) { fdpipe pipe (fdopen_pipe ()); auto_fd null (ie ? fdnull () : auto_fd ()); process pr (start_git (min_ver, 0 /* stdin */, pipe /* stdout */, ie ? null.get () : 2 /* stderr */, forward (args)...)); return git_line (move (pr), move (pipe), ie); } }