summaryrefslogtreecommitdiffstats
path: root/bdep/git.ixx
blob: dbc43cb3416b3e38e60f576360d01fbe17dbc2e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// file      : bdep/git.ixx -*- C++ -*-
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license   : MIT; see accompanying LICENSE file

namespace bdep
{
  template <typename I, typename O, typename E, typename... A>
  inline process
  start_git (const semantic_version& min_ver,
             const dir_path& repo,
             I&& in, O&& out, E&& err,
             A&&... args)
  {
    return start_git (min_ver,
                      forward<I> (in), forward<O> (out), forward<E> (err),
                      "-C", repo,
                      forward<A> (args)...);
  }

  inline void
  finish_git (process& pr, bool io_read)
  {
    finish ("git", pr, io_read);
  }

  template <typename... A>
  inline optional<string>
  git_line (const semantic_version& min_ver,
            const dir_path& repo,
            bool ie,
            A&&... args)
  {
    return git_line (min_ver,
                     ie,
                     "-C", repo,
                     forward<A> (args)...);
  }
}