diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-06-22 15:49:05 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-06-22 19:31:26 +0300 |
commit | c2404728b623588aa89920ae435b48af0fef011e (patch) | |
tree | ba739c37837b71dbc8881cad81204ac2ee6f50e4 /bdep/git.txx | |
parent | f95f24412ea85149556b34abb91f06e247d6db6d (diff) |
Add branch sub-option for git project vcs in bdep-new
Also fix tests which failed if for the initial branch git-init defaults to
the name other than 'master'.
Diffstat (limited to 'bdep/git.txx')
-rw-r--r-- | bdep/git.txx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bdep/git.txx b/bdep/git.txx index ef81bd8..2af8e1f 100644 --- a/bdep/git.txx +++ b/bdep/git.txx @@ -8,7 +8,7 @@ namespace bdep run_git (const semantic_version& min_ver, bool system, bool progress, - const dir_path& repo, + const dir_path* repo, A&&... args) { // Unfortunately git doesn't have any kind of a no-progress option but @@ -30,10 +30,12 @@ namespace bdep // process pr (start_git (min_ver, system, - repo, 0 /* stdin */, err /* stdout */, err /* stderr */, + (repo != nullptr + ? cstrings ({"-C", repo->string ().c_str ()}) + : cstrings ()), forward<A> (args)...)); bool io (false); |