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'. --- tests/release.testscript | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/release.testscript') diff --git a/tests/release.testscript b/tests/release.testscript index 1140161..2b86964 100644 --- a/tests/release.testscript +++ b/tests/release.testscript @@ -16,7 +16,7 @@ g = [cmdline] git 2>! >&2 # Create the remote repository. # +mkdir --no-cleanup prj.git -+$g -C prj.git init --bare &prj.git/*** ++$g -C prj.git -c init.defaultBranch=master init --bare &prj.git/*** clone_rep = [cmdline] cp --no-cleanup -pr ../prj.git ./ &prj.git/*** clone_root_rep = [cmdline] cp --no-cleanup -pr $~/prj.git ./ &prj.git/*** @@ -54,6 +54,8 @@ pull2 = [cmdline] $gp2 pull --ff-only fetch2 = [cmdline] $gp2 fetch log2 = [cmdline] $gp2 log '--pretty=format:"%d %s"' +new += --vcs git,branch=master 2>- + : single-pkg : { @@ -1103,11 +1105,10 @@ log2 = [cmdline] $gp2 log '--pretty=format:"%d %s"' # Create the remote repository. # +mkdir --no-cleanup prj.git - +git -C prj.git init --bare --quiet &prj.git/*** + +git -C prj.git -c init.defaultBranch=master init --bare --quiet &prj.git/*** # Create the local repository. # - new += 2>- +$new -t empty prj &prj/*** +$new -t exe --package prj -d prj +$new -t lib --package libprj -d prj -- cgit v1.1