aboutsummaryrefslogtreecommitdiff
path: root/bdep/git.ixx
blob: 936956429b93d7d14fd292f2d376fa5815e2f8db (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
// file      : bdep/git.ixx -*- C++ -*-
// copyright : Copyright (c) 2014-2018 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 dir_path& repo, I&& in, O&& out, E&& err, A&&... args)
  {
    return start_git (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 dir_path& repo, bool ie, A&&... args)
  {
    return git_line (ie,
                     "-C", repo,
                     forward<A> (args)...);
  }
}