From c2404728b623588aa89920ae435b48af0fef011e Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 22 Jun 2023 15:49:05 +0300 Subject: 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'. --- bdep/git.txx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bdep/git.txx') 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 (args)...)); bool io (false); -- cgit v1.1