Skip to content

Commit 2ce7467

Browse files
committed
Do not initialize master branch if branches were specified in the ruleset.
1 parent d257d0e commit 2ce7467

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/repository.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ Repository::Repository(const Rules::Repository &rule)
7272
branches.insert(branchRule.name, branch);
7373
}
7474

75-
// create the default branch
76-
branches["master"].created = 1;
75+
// create the default branch if no branches were manually specified
76+
if (rule.branches.length() == 0)
77+
branches["master"].created = 1;
7778

7879
fastImport.setWorkingDirectory(name);
7980
if (!CommandLineParser::instance()->contains("dry-run")) {

0 commit comments

Comments
 (0)